Record Count in .net w/ ODBC connection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a odbc connection I am making to a xbase .dbf file and want to
determine the number of records in the file. THe following code keeps
returning -1 to me???

Any Ideas?


CODE:

Dim oODBCConnection As OdbcConnection
Dim sConnString As String = "Driver={Microsoft dBase Driver
(*.dbf)};DBQ=f:\105\dsd\dbfs\"

Dim mystring As String = "Select * FROM Product"
Dim cmd As OdbcCommand = New OdbcCommand(mystring)
oODBCConnection = New OdbcConnection(sConnString)
oODBCConnection.Open()

Dim recordcount As New OdbcCommand("Select * from Product.dbf",
oODBCConnection)
 
What, read the documentation, you must be joking.... seriously, I did read
the documentation, but obviously did not "get it". Thanks for your prompt
reply.
That was the issue. What would we do without kind folks like you to help us
who are new to the .net world and SQL along!? Thanks again.
 

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

Back
Top