x_router Level: Graduate
 Registered: 07-05-2006 Posts: 9
|
DBF Linking Problem
Hi guys!
Im trying to link a dbf file using adodb. please see my code below:
Set cn = New ADODB.Connection
Set rs = new ADODB.recordset
If cn.State = adStateOpen Then cn.Close
cn.Open "Driver={Microsoft Visual Foxpro Driver};" & _
"SourceType=DBF;" & _
"SourceDB=c:\payroll\Paydata\attenda.dbf;" & _
"Exclusive=No;"
cn.CursorLocation = adUseClient
strSQL = "select * from attenda"
' attenda is table name
rs.Open strSQL, cn, adOpenKeyset, adLockOptimistic, adCmdText
i encountered ERROR MSG "Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another"
when i checked cn it was empty.
i really need your knowledge with this. please help me guys!
thanks in advance
|