473,657 Members | 2,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Weird 'incorrect syntax near WHERE' message from MessageBox

I have a Messagebox that looks like:

MessageBox.Show ("There are pending changes for this patient. Do you want to
continue to close?", "Pending Changes", MessageBoxButto ns.YesNo,
MessageBoxIcon. Question)

When I execute the Messagebox.Show , then press either 'Yes' or 'No' I get 25
of the following Messageboxes:

"incorrect syntax near the keyword WHERE"

I am sure that this is tied to some other problem in my form but I have NO
clue where. I have put breakpoints before and after the Messagebox.Show so
I know that the problem occurs in the Messagebox execution. I am working
with a dataset in this form but the dataset table has 21 fields so I can't
see any correlation with that table.

ANY IDEAS?

??????????????? ???????

TIA,

Larry Woods
Nov 21 '05 #1
4 1998
Its a SQL error... Check your SQL adapters on your updates.
"Larry Woods" <la***@NOSPAMlw oods.com> wrote in message
news:Ow******** ******@tk2msftn gp13.phx.gbl...
I have a Messagebox that looks like:

MessageBox.Show ("There are pending changes for this patient. Do you want
to
continue to close?", "Pending Changes", MessageBoxButto ns.YesNo,
MessageBoxIcon. Question)

When I execute the Messagebox.Show , then press either 'Yes' or 'No' I get
25
of the following Messageboxes:

"incorrect syntax near the keyword WHERE"

I am sure that this is tied to some other problem in my form but I have NO
clue where. I have put breakpoints before and after the Messagebox.Show
so
I know that the problem occurs in the Messagebox execution. I am working
with a dataset in this form but the dataset table has 21 fields so I can't
see any correlation with that table.

ANY IDEAS?

??????????????? ???????

TIA,

Larry Woods

Nov 21 '05 #2
Nope! Turns out that I added the two additional parameters that were part
of another cast of MessageBox and it works fine! After sending my original
email I moved the Messagebox around at different places in the program and
at one place it just kept displaying my original MessageBox message 25
times!!!! It's obvious that it is somewhere tied with what I am doing in my
program but I am surprised that Messagebox is getting so screwed
up...considerin g the protections that are built into the .NET framework.

Larry

"CJ Taylor" <jj******@jacks on5.com> wrote in message
news:%2******** **********@TK2M SFTNGP12.phx.gb l...
Its a SQL error... Check your SQL adapters on your updates.
"Larry Woods" <la***@NOSPAMlw oods.com> wrote in message
news:Ow******** ******@tk2msftn gp13.phx.gbl...
I have a Messagebox that looks like:

MessageBox.Show ("There are pending changes for this patient. Do you want
to
continue to close?", "Pending Changes", MessageBoxButto ns.YesNo,
MessageBoxIcon. Question)

When I execute the Messagebox.Show , then press either 'Yes' or 'No' I get 25
of the following Messageboxes:

"incorrect syntax near the keyword WHERE"

I am sure that this is tied to some other problem in my form but I have NO clue where. I have put breakpoints before and after the Messagebox.Show
so
I know that the problem occurs in the Messagebox execution. I am working with a dataset in this form but the dataset table has 21 fields so I can't see any correlation with that table.

ANY IDEAS?

??????????????? ???????

TIA,

Larry Woods


Nov 21 '05 #3
I stand corrected.

I have my initialization code in the form Activate event procedure instead
of the Load procedure...and it's reentering the procedure.

Larry

"Larry Woods" <la***@NOSPAMlw oods.com> wrote in message
news:Oj******** ******@TK2MSFTN GP11.phx.gbl...
Nope! Turns out that I added the two additional parameters that were part
of another cast of MessageBox and it works fine! After sending my original email I moved the Messagebox around at different places in the program and
at one place it just kept displaying my original MessageBox message 25
times!!!! It's obvious that it is somewhere tied with what I am doing in my program but I am surprised that Messagebox is getting so screwed
up...considerin g the protections that are built into the .NET framework.

Larry

"CJ Taylor" <jj******@jacks on5.com> wrote in message
news:%2******** **********@TK2M SFTNGP12.phx.gb l...
Its a SQL error... Check your SQL adapters on your updates.
"Larry Woods" <la***@NOSPAMlw oods.com> wrote in message
news:Ow******** ******@tk2msftn gp13.phx.gbl...
I have a Messagebox that looks like:

MessageBox.Show ("There are pending changes for this patient. Do you want to
continue to close?", "Pending Changes", MessageBoxButto ns.YesNo,
MessageBoxIcon. Question)

When I execute the Messagebox.Show , then press either 'Yes' or 'No' I get 25
of the following Messageboxes:

"incorrect syntax near the keyword WHERE"

I am sure that this is tied to some other problem in my form but I have
NO
clue where. I have put breakpoints before and after the
Messagebox.Show so
I know that the problem occurs in the Messagebox execution. I am

working with a dataset in this form but the dataset table has 21 fields so I can't see any correlation with that table.

ANY IDEAS?

??????????????? ???????

TIA,

Larry Woods



Nov 21 '05 #4
=) So is the problem solved?
"Larry Woods" <la***@NOSPAMlw oods.com> wrote in message
news:eI******** ******@TK2MSFTN GP11.phx.gbl...
I stand corrected.

I have my initialization code in the form Activate event procedure instead
of the Load procedure...and it's reentering the procedure.

Larry

"Larry Woods" <la***@NOSPAMlw oods.com> wrote in message
news:Oj******** ******@TK2MSFTN GP11.phx.gbl...
Nope! Turns out that I added the two additional parameters that were
part
of another cast of MessageBox and it works fine! After sending my

original
email I moved the Messagebox around at different places in the program
and
at one place it just kept displaying my original MessageBox message 25
times!!!! It's obvious that it is somewhere tied with what I am doing in

my
program but I am surprised that Messagebox is getting so screwed
up...considerin g the protections that are built into the .NET framework.

Larry

"CJ Taylor" <jj******@jacks on5.com> wrote in message
news:%2******** **********@TK2M SFTNGP12.phx.gb l...
> Its a SQL error... Check your SQL adapters on your updates.
>
>
> "Larry Woods" <la***@NOSPAMlw oods.com> wrote in message
> news:Ow******** ******@tk2msftn gp13.phx.gbl...
> >I have a Messagebox that looks like:
> >
> > MessageBox.Show ("There are pending changes for this patient. Do you want > > to
> > continue to close?", "Pending Changes", MessageBoxButto ns.YesNo,
> > MessageBoxIcon. Question)
> >
> > When I execute the Messagebox.Show , then press either 'Yes' or 'No' I

get
> > 25
> > of the following Messageboxes:
> >
> > "incorrect syntax near the keyword WHERE"
> >
> > I am sure that this is tied to some other problem in my form but I have
NO
> > clue where. I have put breakpoints before and after the

Messagebox.Show > > so
> > I know that the problem occurs in the Messagebox execution. I am

working
> > with a dataset in this form but the dataset table has 21 fields so I

can't
> > see any correlation with that table.
> >
> > ANY IDEAS?
> >
> > ??????????????? ???????
> >
> > TIA,
> >
> > Larry Woods
> >
> >
>
>



Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
9906
by: Carl | last post by:
Can you tell me what is wrong with this syntax ? string select = "UPDATE .. " + "(,,,,,,, ,,,, ,,, , , , ) " + " VALUES (@id,@clientid,@total,@tps,@tvq,@gtotal,@datefac,@datepay,
11
7098
by: Mark Findlay | last post by:
Hello Experts! I am attempting to use the OleDbCommand.ExecuteScaler() function within my ASP.NET C# web page to perform a simple validation, but receive the following error: "Incorrect syntax near the keyword 'DEFAULT'" The form has 2 fields on it, called tb_username and tb_password. (see code snippet below).
4
2337
by: Patrick Olurotimi Ige | last post by:
why is this giving me error System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near '='.?? my code is in c# strSql = "Update addmessage Set message = '"+null+"' Where ID=" +ID; strSql = "Update addmessage Set message = '"+message+"' Where ID=" +ID; *** Sent via Developersdex http://www.developersdex.com ***
1
11237
by: Sandesh | last post by:
Hello All, Me saying " has any body come across such error would be underestimating". Well I am getting a very peculiar and unique error "Line 1: Incorrect syntax near 'Actions'." Explaining you the scene is the following Stored Proc.
1
2343
by: iporter | last post by:
In the following code, the two Response.Write statements output exactly the same - I can copy and paste both into Query Analyzer, and run them fine. However, if I comment out line 3, the assignment of "SELECT T..." to the variable query, the last line produces the error: Line 1: Incorrect syntax near '<'. Many thanks in advance for any explanation - the problem is tearing my hair out!! Iain
5
4245
by: Mario Krsnic | last post by:
Hallo zusammen, I have an app. with SQL-Server. The same page worked fine with Access-DB. Now I have a problem with this command: Dim strSQL As String Dim myConnection As New SqlConnection("server=mssql07.1und1.de;uid=dbo88888888;pwd=8888888;database=db88888888") myConnection.Open()
0
8304
by: roamnet | last post by:
hi i created database file with .mdf extention ,sql server as a source and use grid view to display data there're no problem in data retrieve and display,but i want to edit it or insert new records there is an error "Incorrect syntax near '-'. Must declare the scalar variable "@UserName". I worked out in design view,code is automatically generated.Iam not able fix the error. Iam working with Visual Web Developer-2005 Express Edition
3
3396
by: teddymeu | last post by:
Hi Guys, new to development using visual studio and vb.net 2.0. and SQL express. Have a small problem. I have an update command which im using to change the values of a blob image table to NULL so that i can then insert a new image into the table. This works fine. My problem is that my insert statement has an error and i cant figure this out. if i dont add the where clause it works fine but inserts the new image into the table without the...
10
3408
by: arial | last post by:
Hi, I am getting this error message: Incorrect syntax near the keyword 'where'. 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: Incorrect syntax near the keyword 'where'. Source Error:
0
8827
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7333
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6167
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4315
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1957
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1620
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.