Read response

H

Hugh Janus

Hi all,

This should be a quick one. I am developing an app using the CF
2005. I am interfacing fine with the DB (i.e. creating tables &
adding records) but now I want to read the output of a command that I
send. I want to get a list of tables in the DB so I am using the
following code:

sqlCommand.CommandText = "SELECT * FROM
INFORMATION_SCHEME.TABLES"
Dim sqlDR As Data.SqlServerCe.SqlCeDataReader =
sqlCommand.ExecuteReader '.ExecuteNonQuery()

sqlDR.Read()
MsgBox(sqlDR.GetString(0))


But it returns me an error 5 with the text "[ 1,34,TABLES ]". Any
ideas what I am doing wrong? I simply want a list of all tables
returned to me as a string.

TIA,
Hugh
 
R

rowe_newsgroups

Hi all,

This should be a quick one. I am developing an app using the CF
2005. I am interfacing fine with the DB (i.e. creating tables &
adding records) but now I want to read the output of a command that I
send. I want to get a list of tables in the DB so I am using the
following code:

sqlCommand.CommandText = "SELECT * FROM
INFORMATION_SCHEME.TABLES"
Dim sqlDR As Data.SqlServerCe.SqlCeDataReader =
sqlCommand.ExecuteReader '.ExecuteNonQuery()

sqlDR.Read()
MsgBox(sqlDR.GetString(0))

But it returns me an error 5 with the text "[ 1,34,TABLES ]". Any
ideas what I am doing wrong? I simply want a list of all tables
returned to me as a string.

TIA,
Hugh

The Read() method returns a boolean - was it true or false?

Thanks,

Seth Rowe
 

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

Top