Ethan
New member
- Local time
- Yesterday, 21:02
- Joined
- Jun 13, 2003
- Messages
- 7
Hay all, this is my first post so go easy on me.
I've done several searches and have answered most of my questions over the last week or so of previous threads on creating DSN's through code and linking new tables and refreshing existing tables. Thank you Travis, the code you posted on CheckingExistence/Creating/Deleting was very helpful.
By the way I'm using Access97 and SQL2kServer.
Ok now for my current problem. Some of the links that I am connecting to are Views on SQL2kServer, now if I manual create the link to the view it is updateable but when I refresh the links to the tables/views the tables are fine but the views are no longer updatable and I very much need one of them to be updateable.
I created a client side query that works but is slow as it has to transmit and filter over 100k records.
So what's the Deal?
I've done several searches and have answered most of my questions over the last week or so of previous threads on creating DSN's through code and linking new tables and refreshing existing tables. Thank you Travis, the code you posted on CheckingExistence/Creating/Deleting was very helpful.
By the way I'm using Access97 and SQL2kServer.
Ok now for my current problem. Some of the links that I am connecting to are Views on SQL2kServer, now if I manual create the link to the view it is updateable but when I refresh the links to the tables/views the tables are fine but the views are no longer updatable and I very much need one of them to be updateable.
Code:
Dim tblArray(7) As String
tblArray(1) = "Dish"
tblArray(2) = "DishProcess"
tblArray(3) = "tblPrmServ"
tblArray(4) = "vwPrmServ"
tblArray(5) = "vwPrmServList"
tblArray(6) = "vwSPS"
Dim tdf As TableDef
Dim i As Integer
For i = 1 To 6
'Set tdf = CurrentDb.TableDefs(tblArray(i))
For Each tdf In CurrentDb.TableDefs
If tdf.Name = tblArray(i) Then
Debug.Print tdf.Connect
tdf.Connect = "ODBC;DSN=" & strDSN & ";Description=" & strDSNDescription & ";APP=" & strApplication & ";WSID=" & clsCheckWS.ComputerName & ";DATABASE=" & strDatabase & ";Trusted_Connection=" & strTrustedConn & ";UID=" & strUserName & ";PWD=" & strUserPwd
tdf.RefreshLink
Debug.Print tdf.Connect
Exit For
End If
Next
Next i
I created a client side query that works but is slow as it has to transmit and filter over 100k records.
So what's the Deal?