fiogf49gjkf0d Hi
I am trying to get data from a remote users cut so I can compare it to data we have on the main server. We are using access to connect to the remote cut using one of the following connection strings
'connUser.Open "Provider=sqloledb;Data Source=LG35044083;Initial Catalog=SLXRemote;Integrated Security=SSPI;User ID = ; Password = ;" 'connUser.Open "Data Source=.\\SQLExpress;Integrated Security=true;" & _ ' "User Instance=true;AttachDBFilename=|DataDirectory|\SLX_KM75179_dat.mdf;" & _ ' "Initial Catalog=SLXRemote;"
'connUser.Open "Provider=sqloledb;Data Source=,1433;Network Library=DBMSSOCN;Initial Catalog=SLXRemote;User ID=assword=;"
connUser.Open "Provider=sqloledb;Data Source=\LG35044083;Initial Catalog=SLXRemote;Integrated Security=SSPI;"
'connUser.Open "Provider=MS Remote;" & _ ' "Remote Server=LG35044083;" & _ ' "Remote Provider=SQLOLEDB;" & _ ' "Data Source=LG35044083;" & _ ' "Initial Catalog=SLXRemote;" & _ ' "User ID=" & _ ' "Password="
I do not get any error messages when using any of the connection strings above but my access table is getting blank values through. Any help please
Code below so you get the idea of what I am trying to do
Dim strGetId As String strGetId = "SELECT HistoryID from sysdba.HISTORY"
Set rst = CreateObject("ADODB.Recordset") rst.CursorLocation = adUseClient rst.Open strGetId, connUser, adOpenKeyset, adLockBatchOptimistic rst.MoveFirst 'Debug.Print rst("HISTORYID") Set rstDB = db.OpenRecordset("userHistory")
i = 0 While Not rst.EOF rstDB.AddNew MsgBox rst("HISTORYID").Value rstDB("HISTORYID").Value = rst("HISTORYID").Value rstDB.Update i = i + 1 rst.MoveNext Wend |