Command nesnesi (execute) ile inner join nasıl kullanabilirm?
#1
Merhaba.
Aşağıda record set ile yapmış olduğum halen çalışan bir inner join çalışmam var.
Fakat ben bu inner joini command nesnesi ile birlikte kullanmak istiyorum.
Aşağıdaki kodları command nesnesi(execute ile) ile nasıl yazmalıyım.Teşekkür ederim.
SQL
  1. rs1.OPEN "select VERI.ID_VERI,ISIM.ISIM,VERI.SEHIR,VERI.KILO from [VERI]" _
  2. & " INNER JOIN ISIM on VERI.ID_ISIM = ISIM.ISIM_ID order by ISIM.ISIM;", conn, adOpenKeyset, adLockReadOnly





  Alıntı
Bu mesajı beğenenler:
#2
Merhaba;

Visual Basic
  1. Dim cmd As New ADODB.Command
  2. Set rs = New ADODB.Recordset
  3. Set conn = New ADODB.Connection
  4.  
  5. conn.ConnectionString = "PROVIDER=Microsoft.SQLSERVER.CE.OLEDB.3.5;" _
  6. & "Data Source = C:\Documents and Settings\xxxxxxxx"
  7.  
  8. conn.Open
  9. cmd.ActiveConnection = conn
  10.  
  11.  
  12.  
  13. cmd.CommandText = "select * from personel"
  14. rs = cmd.Execute



Buna benzer yapabilirsiniz.. Connection stringi ve Command texti düzenleyip kullanabilrisiniz..
Javascript
  1. this.setState({sign:"Here comes the sun...."})







  Alıntı
Bu mesajı beğenenler:
#3
Üstadım teşekkür ederim.
Verdiğiniz kodlar oldu.
Bende aşağıdaki gibi denedim.Oda oldu.Aşağıdaki koduda kullanabilirmiyim.Bir sakınca doğururmu?.
Excel VBA kullandım.vt compact 3,5
SQL
  1. Dim rs1 AS ADODB.Recordset
  2. SET rs1 = NEW ADODB.Recordset
  3. SET rs1 = conn.EXECUTE("select VERI.ID_VERI,ISIM.ISIM,VERI.SEHIR,VERI.KILO from [VERI]" _
  4. & " INNER JOIN ISIM on VERI.ID_ISIM = ISIM.ISIM_ID order by ISIM.ISIM;")
  5. ListBox1.Clear
  6. ListBox1.COLUMN = rs1.GetRows
  7. SET rs1 = Nothing





  Alıntı
Bu mesajı beğenenler:


Foruma Git:


Bu konuyu görüntüleyen kullanıcı(lar): 1 Ziyaretçi