Welcome to Help4Web.co.uk - Web Design Help, Html Tutorial, Php, Asp , SQL help and CCNA, MCSE definitions!
Google
Webkpop-web.com

     Main Menu

· Home
· Free Downloads
· Computing FAQ
· Contact Us
· Free Software Downloads
· Tech Forum
· Technology News
· Web Design Help
· Web Links
· Your Online Account
· Your PM



     Web Browser


     Website Links
Supermediastore! #1 in Computer media & Accessory

White Papers IT
Learn Korean
Chinese Pop Music
Advertise Kpop
Korean Pop Site Map
Web Design
Pop Music
Chinese Girls
HK Pop Korean Music
Lee Hyori
Hyori
Boa Park Ji Yoon
Baby Vox YG Family
Jeon Ji Hyun
1 Tym Ha Ji Won
Shyne Rain Bi
Shin Mina SM Town
Fly to the Sky
Korean Girls and Models
Nicholas Tse
161 Clan
보아
Edison Chen
Sung Hi Lee
Shinhwa
Andy Lau Jay Chou
White Papers
Case Study SES
Kelly Chen
Liu Yi Fei Sammi Cheng
Jordan Chan Music
Computer Jobs IT

Computer Help Forum and Programming Advice :: View topic - sql command help
 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log inLog in 

sql command help

 
Post new topic   Reply to topic    Computer Help Forum and Programming Advice Forum Index -> SQL and Databases
View previous topic :: View next topic  
Author Message
cpl_hicks
Freshman
Freshman


Joined: Feb 01, 2005
Posts: 2

PostPosted: Wed Feb 02, 2005 12:38 am    Post subject: sql command help Reply with quote

im trying to run the following sql command string in a asp webpage, i run the command and i keep recieving erors on the syntax, ive tried looking at it and debuggin it my self, but any more time spent on this and i think i will have to gouge my own eyes out


the code

sqlString = "INSERT INTO title " &_
"( jhm_tit_name, jhm_tit_price, jhm_tit_format, " &_
"jhm_tit_artist, jhm_tit_image, jhm_tit_category, " &_
"jhm_tit_status ) VALUES ( " &_
" '" & productName & ", " &_
" " & productPrice & ", " &_
" '" & productFormat & "', " &_
" '" & productArtist & "', " &_
" '" & productImage & "', " &_
" '" & productCategory & "', " &_
productStatus & " )"


the error shown

Syntax error in string in query expression '', , '', '', '', '', )'.


the sql as shown with reponce.write in webpage

INSERT INTO title ( jhm_tit_name, jhm_tit_price, jhm_tit_format, jhm_tit_artist, jhm_tit_image, jhm_tit_category, jhm_tit_status ) VALUES ( ', , '', '', '', '', )
Back to top
View user's profile Send private message
theq
Freshman
Freshman


Joined: Jan 18, 2005
Posts: 4

PostPosted: Thu Feb 03, 2005 5:51 am    Post subject: Reply with quote

The syntax error has to do with the fact your missing a '

Try this

sqlString = "INSERT INTO title ( jhm_tit_name, jhm_tit_price, jhm_tit_format, jhm_tit_artist, jhm_tit_image, jhm_tit_category, jhm_tit_status )"

sqlString = sqlString & "VALUES ( '" & productName & "','" & productPrice & "','" & productFormat & "','" & productArtist & "','" & productImage & "','" & productCategory & "','" &_
productStatus & "')"
Back to top
View user's profile Send private message
theq
Freshman
Freshman


Joined: Jan 18, 2005
Posts: 4

PostPosted: Thu Feb 03, 2005 5:53 am    Post subject: Reply with quote

Remember that SQL Syntax uses '

so when you do " & string & " you need ' on the outside of your "'s
giving you '" & string & "'
Back to top
View user's profile Send private message
Jon
Web Design Admin
Web Design Admin


Joined: Jul 12, 2004
Posts: 72

PostPosted: Thu Feb 03, 2005 5:57 am    Post subject: Reply with quote

thanks for the advice....
_________________
Free MusicCpopServer Definition
Back to top
View user's profile Send private message Visit poster's website
cpl_hicks
Freshman
Freshman


Joined: Feb 01, 2005
Posts: 2

PostPosted: Thu Feb 03, 2005 8:25 am    Post subject: Reply with quote

woot Very Happy

*starts dancing madly around the room, giveing imaginary high fives*

it works it works it works

sorrry for my madness there, but looking at the same piece of code for several hours a day for the last three days has turned my slightly mad Smile

anyway thanks for the hewlp, i just knew it would be something stupid Laughing Laughing Laughing
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Computer Help Forum and Programming Advice Forum Index -> SQL and Databases All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum







Learn Chinese | Learn cantonese | Learn Mandarin | Grace Park | Party Organisers | Kaila yu | Phone Card | Twins | Chinese Society | Loans UK | BokuMaro | CV Help Book | Chinese Wife | Korean Singles | British Born Chinese | Bae Yong Jun | Speak Korean | Chinese Models | Music | Information Security Management | Maritime Greenwich Campus | Covering Letters Help | Chinese Music | Jang Nara | SES | YG Family | Learn Korean | Firewall Definition | Server Definition | Wireless Network Definition | E-Commerce Definition | Sales Leads | Application Firewall | CCNA definitions | Research Papers | Webcast | CV Help

Author KPop Music :- Jon Bock ( Chinese Pop Music Learn Korean )
Produced by Kpop-Web Design Associates, all rights not reserved.
Internet Marketing and Search Engine Optimisation Software Defined Radio