PDA

View Full Version : ADO.Net error help please


Spam
17-09-2004, 09:46
Im doing a batch query in an ado,net data adaptor that looks like this:

"Select AdditionalDriver1,AdditionalDriver1DOB from edi; Select AdditionalDriver2,AdditionalDriver2DOB from edi; Select AdditionalDriver3,AdditionalDriver3DOB from edi"


however when i try to fill up aa dataset with this query, trying to get 3 seperate tables within it, i get the error:

"Characters found after end of SQL statement"

i cant see anything wrong with that select. Ive done soemthing similar to retreive 2 tables into a dataset and this looks the same, with the rigth ";" delimiter and everything.

Anyone see what characters the error is referring to?

The code just looks like this:

Dim da As New OleDbDataAdapter(strSQL, strConnString)

Dim ds As New DataSet
Try
da.Fill(ds)
Catch ex As Exception
MsgBox("Error generating Dataset: " & ex.Message)
End Try

gz5ztg
17-09-2004, 09:50
Drop the ; delimiter and use a carraige return instead.

Spam
17-09-2004, 09:58
nope i jsut get a "Syntax error in From clause" then.


i used the ";" in the previous query to return two tables and that worked fine.