469,913 Members | 2,016 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,913 developers. It's quick & easy.

Syntax error about daAngio.Fill(dsAngio, "AngioInfo")

Anyone could give me a hand about this syntax error? Thank you.
David
Source Code:
Dim conn As New SqlConnection(strConn)
Dim daAngio As New SqlDataAdapter(strSelectStatement, conn)
'Create a dataset
Dim dsAngio As New DataSet
'fill in the dataset by adapter
daAngio.Fill(dsAngio, "AngioInfo")
Dim ok As Boolean = False

Error Message:
Line 1: Incorrect syntax near ','.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Line 1: Incorrect
syntax near ','.

Source Error:
Line 85: Dim dsAngio As New DataSet
Line 86: 'fill in the dataset by adapter
Line 87: daAngio.Fill(dsAngio, "AngioInfo")
Line 88:
Line 89: Dim ok As Boolean = False
Source File: c:\inetpub\wwwroot\Demo\ShowImages\ShowAngio4Patie nt.aspx.vb
Line: 87

Jan 5 '06 #1
2 1921
The syntax error is in your sql statement.

If it was a syntax error in your code, this wouldn't compile, meaning it
could never run.

"david" <da***@discussions.microsoft.com> wrote in message
news:82**********************************@microsof t.com...
Anyone could give me a hand about this syntax error? Thank you.
David
Source Code:
Dim conn As New SqlConnection(strConn)
Dim daAngio As New SqlDataAdapter(strSelectStatement, conn)
'Create a dataset
Dim dsAngio As New DataSet
'fill in the dataset by adapter
daAngio.Fill(dsAngio, "AngioInfo")
Dim ok As Boolean = False

Error Message:
Line 1: Incorrect syntax near ','.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about
the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Line 1: Incorrect
syntax near ','.

Source Error:
Line 85: Dim dsAngio As New DataSet
Line 86: 'fill in the dataset by adapter
Line 87: daAngio.Fill(dsAngio, "AngioInfo")
Line 88:
Line 89: Dim ok As Boolean = False
Source File: c:\inetpub\wwwroot\Demo\ShowImages\ShowAngio4Patie nt.aspx.vb
Line: 87

Jan 5 '06 #2
Thanks. I found the error. When you make a copy/paste, it automatically adds
brakets ( ).

David
"Marina" wrote:
The syntax error is in your sql statement.

If it was a syntax error in your code, this wouldn't compile, meaning it
could never run.

"david" <da***@discussions.microsoft.com> wrote in message
news:82**********************************@microsof t.com...
Anyone could give me a hand about this syntax error? Thank you.
David
Source Code:
Dim conn As New SqlConnection(strConn)
Dim daAngio As New SqlDataAdapter(strSelectStatement, conn)
'Create a dataset
Dim dsAngio As New DataSet
'fill in the dataset by adapter
daAngio.Fill(dsAngio, "AngioInfo")
Dim ok As Boolean = False

Error Message:
Line 1: Incorrect syntax near ','.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about
the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Line 1: Incorrect
syntax near ','.

Source Error:
Line 85: Dim dsAngio As New DataSet
Line 86: 'fill in the dataset by adapter
Line 87: daAngio.Fill(dsAngio, "AngioInfo")
Line 88:
Line 89: Dim ok As Boolean = False
Source File: c:\inetpub\wwwroot\Demo\ShowImages\ShowAngio4Patie nt.aspx.vb
Line: 87


Jan 5 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

14 posts views Thread by sam | last post: by
1 post views Thread by Steve | last post: by
1 post views Thread by Donald Canton | last post: by
3 posts views Thread by Manuel | last post: by
4 posts views Thread by nickyeng | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.