473,508 Members | 2,053 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", MessageBoxButtons.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 1992
Its a SQL error... Check your SQL adapters on your updates.
"Larry Woods" <la***@NOSPAMlwoods.com> wrote in message
news:Ow**************@tk2msftngp13.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", MessageBoxButtons.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...considering the protections that are built into the .NET framework.

Larry

"CJ Taylor" <jj******@jackson5.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
Its a SQL error... Check your SQL adapters on your updates.
"Larry Woods" <la***@NOSPAMlwoods.com> wrote in message
news:Ow**************@tk2msftngp13.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", MessageBoxButtons.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***@NOSPAMlwoods.com> wrote in message
news:Oj**************@TK2MSFTNGP11.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...considering the protections that are built into the .NET framework.

Larry

"CJ Taylor" <jj******@jackson5.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
Its a SQL error... Check your SQL adapters on your updates.
"Larry Woods" <la***@NOSPAMlwoods.com> wrote in message
news:Ow**************@tk2msftngp13.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", MessageBoxButtons.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***@NOSPAMlwoods.com> wrote in message
news:eI**************@TK2MSFTNGP11.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***@NOSPAMlwoods.com> wrote in message
news:Oj**************@TK2MSFTNGP11.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...considering the protections that are built into the .NET framework.

Larry

"CJ Taylor" <jj******@jackson5.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
> Its a SQL error... Check your SQL adapters on your updates.
>
>
> "Larry Woods" <la***@NOSPAMlwoods.com> wrote in message
> news:Ow**************@tk2msftngp13.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", MessageBoxButtons.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
9888
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
7086
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...
4
2326
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; ...
1
11217
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'." ...
1
2331
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...
5
4238
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...
0
8291
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...
3
3391
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...
10
3384
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...
0
7125
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
7388
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...
1
7049
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7499
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...
0
5631
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,...
1
5055
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...
0
3199
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...
0
1561
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
767
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.