This site is no longer active and is available for archival purposes only. Registration and login is disabled.

SQL Proboblem/Bug


SQL Proboblem/Bug

Postby RwGast » Dec 19, 2001 @ 5:03pm

How would you run a WHERE on 17' monitors? <br>LIKE SELECT * FROM tblTable WHERE fldPRoducts = '17' monitors' SQL doesnt likt the single quaote. Is there an escape sequence like \' or something?
http://www.angelfire.com/ego/esoteric if you like to play quake3 keep your eye on this site
User avatar
RwGast
pm Member
 
Posts: 1123
Joined: Jun 28, 2001 @ 7:36pm
Location: California, USA


Re: SQL Proboblem/Bug

Postby Paul » Dec 19, 2001 @ 5:13pm

&' i think...
Paul
pm Insider
 
Posts: 9835
Joined: Apr 2, 2001 @ 3:15pm
Location: California


Re: SQL Proboblem/Bug

Postby RICoder » Dec 20, 2001 @ 5:15am

Did you try double quotes?<br><br>"17' Monitor"<br><br>Depends on the implimentation of SQL, and I never tried it on a PPC.
<iframe src="http://gamercard.xbox.com/RICoder.card" scrolling="no" frameBorder="0" height="140" width="204">RICoder</iframe>
User avatar
RICoder
FOX News Correspondent
 
Posts: 3948
Joined: Jul 10, 2001 @ 1:48pm
Location: the matrix has me


Re: SQL Proboblem/Bug

Postby RwGast » Dec 21, 2001 @ 6:47pm

Ok heres the deal &' doesnt work i get this error<br><br>Query:<br>select * from CCIProducts where pdctProductCode LIKE '&''<br><br>Error:<br>Server: Msg 105, Level 15, State 1, Line 1<br>Unclosed quotation mark before the character string '&'<br>'.<br>Server: Msg 170, Level 15, State 1, Line 1<br>Line 1: Incorrect syntax near '&'<br>'.<br><br>I tried to use double quotes with  the where attribute and it didnt work<br><br>Query:<br>select * from CCIProducts where pdctProductCode LIKE "memory"<br><br>Error:<br>Server: Msg 207, Level 16, State 3, Line 1<br>Invalid column name 'memory'.<br><br>I am using Microsoft SQL server 7.0 with Visual Basic and ADO, This has nothing to do with the ppc RICoder. I ran all thoughs Querys in the SQL Quey Analizyer to make sure there was no middle man problem with VB and ADO.<br><br>So does anyone know how to do a querly like<br><br>SELECT * FROM CCIProducts WHERE pdctProductCode = '17' monitor'<br><br>The problem is sql thinks im termanating my query at the ' after 17. I know there has to be a way of doing this i just dont know how. <br><br>Any help would be qreatly appriciated becuase this is for my job, thanks. :)
http://www.angelfire.com/ego/esoteric if you like to play quake3 keep your eye on this site
User avatar
RwGast
pm Member
 
Posts: 1123
Joined: Jun 28, 2001 @ 7:36pm
Location: California, USA


Re: SQL Proboblem/Bug

Postby RICoder » Dec 22, 2001 @ 2:52am

ADO is funky like that.  Mostly it requires strict adherence to STANDARD SQL.  Meaning that you need to do stuff like using % as a wild card, even though some DBs use *.  But, in other cases it doesn't care what you do, like you can use a terminating ; in the statement, even though only Access (that I know of) lets you do that.  This is all fluff, but I wrote it anyway.<br><br>My point is, I guess, that standard SQL uses ' as string literal containers, NOT ".  In fact the " will raise an error in some cases in ADO.  It ALWAYS did for me when I tried to write some test code.<br><br>I don't know if there are any escape sequences in SQL...and I won't be in my office to ask our resident SQL guru until Thurs...If you still want to know then, let me know.
<iframe src="http://gamercard.xbox.com/RICoder.card" scrolling="no" frameBorder="0" height="140" width="204">RICoder</iframe>
User avatar
RICoder
FOX News Correspondent
 
Posts: 3948
Joined: Jul 10, 2001 @ 1:48pm
Location: the matrix has me


Re: SQL Proboblem/Bug

Postby RwGast » Dec 22, 2001 @ 1:38pm

ok, ill let you know i think i may be talking to a guy today.
http://www.angelfire.com/ego/esoteric if you like to play quake3 keep your eye on this site
User avatar
RwGast
pm Member
 
Posts: 1123
Joined: Jun 28, 2001 @ 7:36pm
Location: California, USA


Re: SQL Proboblem/Bug

Postby Mr Visitor » Dec 24, 2001 @ 6:58am

Try two single quotes e.g. ''  That works on 'Big' SQL
Mr Visitor
 


Re: SQL Proboblem/Bug

Postby Mr Visitor » Dec 24, 2001 @ 7:06am

Mr Visitor
 


Re: SQL Proboblem/Bug

Postby Mr Visitor » Dec 24, 2001 @ 7:08am

Mr Visitor
 


Re: SQL Proboblem/Bug

Postby Mr Visitor » Dec 24, 2001 @ 7:11am

Mr Visitor
 


Re: SQL Proboblem/Bug

Postby Mr Visitor » Dec 24, 2001 @ 7:13am

Mr Visitor
 


Re: SQL Proboblem/Bug

Postby RwGast » Dec 24, 2001 @ 4:19pm

http://www.angelfire.com/ego/esoteric if you like to play quake3 keep your eye on this site
User avatar
RwGast
pm Member
 
Posts: 1123
Joined: Jun 28, 2001 @ 7:36pm
Location: California, USA


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron