473,385 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 2238
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: sam | last post by:
When I run this SQL query: SELECT u.*, o.* FROM users u, orders o WHERE TO_DAYS(o.order_date) BETWEEN TO_DAYS('2003-09-20')-10 AND TO_DAYS('2003-09-20')+10
1
by: Steve | last post by:
I just spent waaaaaaaaaaaayy too much time trying to track down an error that was incorrectly reported just now, and I would like to see if someone can explain to me why it was reported that way. ...
29
by: shank | last post by:
1) I'm getting this error: Syntax error (missing operator) in query expression on the below statement. Can I get some advice. 2) I searched ASPFAQ and came up blank. Where can find the "rules"...
1
by: Donald Canton | last post by:
Hi, I'm using Bjarne's book to learn C++ and am stuck on the Calc program in Section 6. Everything works fine except when I try to use istringstream to parse a token from the command line. I...
5
by: r.nikhilk | last post by:
Hi, Currently, we are porting C++ applications from 32 bit to 64 bit on AIX platform. (The current version of AIX is 5.3 and xlC verison is 8.0). We are able to compile the applications by...
3
by: Manuel | last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using devc++. So I've imported the glut32.dsp into devc++, included manually some headers, and start to compile. It return a very...
4
by: nickyeng | last post by:
i calling this piece of java code in jsp : List<Customer> list = Customer.listby_page(currentRs); ... ... then it gives me the following error:
0
by: Alexis Boutillier | last post by:
Timothy Grant a écrit : As you can see in my last response, this problem is not linked to the type of error, If I "raise" a SystemError instead of creating a SyntaxError I still can't access...
6
by: muby | last post by:
Hi everybody :) I'm modifying a C++ code in VC++ 2005 my code snippet void BandwidthAllocationScheduler::insert( Message* msg, BOOL* QueueIsFull,
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.