Q: ODBC connection

G

Guest

Hello,

Here is my function:

Private Sub myLiveConn()

Dim strConn As String = "Driver={Microsoft Visual FoxPro
Driver};UID=;SourceType=DBF;SourceDB=F:\Report
Data\appt.dbf;Null=No;Deleted=Yes;Exclusive=No;Connect Timeout=10"

Dim Conn As OdbcConnection = New OdbcConnection(strConn)
Conn.Open()

Dim Da As New OdbcDataAdapter
Dim Ds As New DataSet
Dim cmdSelect As New OdbcCommand

cmdSelect = Conn.CreateCommand
cmdSelect.CommandText = "SELECT * FROM pat"

Da.SelectCommand = cmdSelect
Da.Fill(Ds, "pat")

End Sub

I get an error at conn.open() line: ERROR [IM001] [Microsoft][ODBC Driver
Manager] Driver does not support this function
What is problem?
Thanks,
Jim.
 
G

Guest

Try Using:-
OLE DB, OleDbConnection (.NET)

Database container (.DBC):
----------------------------------
"Provider=vfpoledb.1;Data Source=C:\MyDbFolder\MyDbContainer.dbc;Collating
Sequence=machine"

Free table directory:
---------------------------
"Provider=vfpoledb.1;Data Source=C:\MyDataDirectory\;Collating
Sequence=general"

Force the provider to use an ODBC DSN:
------------------------------------------------
""Provider=vfpoledb.1;DSN=MyDSN""

This should help you..
If not POST ur Error..
Enjoy
Patrick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top