devouru
08-26-2008, 06:50 AM
I have been running a msaccess 2000-3 database with ODBC for several years.
It is now time to move on to OLEDB. Is there a way to subsititute an OLEDB
link for the ODBC for a one stop switch? If not can I get help on how to
place my init string in a new mdb:
Provider=VFPOLEDB.1;Data Source=f:\pcmrpw;Mode=ReadWrite;Password="";Collating Sequence=MACHINE
Many thankx in advance.
-JS
devouru
08-26-2008, 07:20 AM
Noob success, in a form. How can I do this with a query or table.
Private Sub Form_Load()
Dim objCon As ADODB.Connection
Dim objRS As ADODB.Recordset
Set objCon = New ADODB.Connection
objCon.ConnectionString = "Provider=VFPOLEDB.1;Data Source=f:\pcmrpw;Collating Sequence=MACHINE"
objCon.Open objCon.ConnectionString
Set objRS = New ADODB.Recordset
With objRS
Set .ActiveConnection = objCon
.Source = "SELECT * FROM partmast"
.LockType = adLockOptimistic
.CursorType = adOpenKeyset
.Open
End With
Set Me.Recordset = objRS
End Sub
-JS
devouru
08-26-2008, 07:27 AM
Better yet? How bout code in autoexec macro to setup FoxPro tables? Work with me folks. :) Lookin' for a miracle.
-JS
LPurvis
08-26-2008, 09:12 AM
What is your actual problem?
Your second post - you've got that successfully working?
(It looks like it should be OK, depending upon what you're wanting to do).
If your goal is to establish linked tables using an OLEDB provider then you're not going to have any success. ISAM or ODBC drivers only. (And, aside from Sharepoint, ISAM has been steadily on the decline - FoxPro support was once much stronger from Access - no doubt due to MS's recent directions).