Private Sub CommandButton1_Click()
Dim SRV As String
Dim UID As String
Dim PWD As String
Dim DTB As String
SRV = Sheets("SQL").Cells(9, 6)
UID = Sheets("SQL").Cells(10, 6)
PWD = Sheets("SQL").Cells(11, 6)
DTB = Sheets("SQL").Cells(12, 6)
With Sheets("URUNLER").Range("URUNLER").QueryTable
.Connection = _
"ODBC;DRIVER=SQL Server;SERVER=" & SRV & ";UID=" & UID & ";PWD=" & PWD & ";DATABASE=" & DTB & " "
.CommandText = Array( _
"SELECT * FROM ZUMRUT10.DBO.AAADENEME")
.Refresh BackgroundQuery:=False
End With
End Sub
yukarıdaki cümlede nerede yanlış yapıyorum yardımcı olursanız sevinirim
Dim SRV As String
Dim UID As String
Dim PWD As String
Dim DTB As String
SRV = Sheets("SQL").Cells(9, 6)
UID = Sheets("SQL").Cells(10, 6)
PWD = Sheets("SQL").Cells(11, 6)
DTB = Sheets("SQL").Cells(12, 6)
With Sheets("URUNLER").Range("URUNLER").QueryTable
.Connection = _
"ODBC;DRIVER=SQL Server;SERVER=" & SRV & ";UID=" & UID & ";PWD=" & PWD & ";DATABASE=" & DTB & " "
.CommandText = Array( _
"SELECT * FROM ZUMRUT10.DBO.AAADENEME")
.Refresh BackgroundQuery:=False
End With
End Sub
yukarıdaki cümlede nerede yanlış yapıyorum yardımcı olursanız sevinirim
