navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Free FrontPage Templates

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

80040e14'

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> 80040e14'
Page: [1]
 
prasmile2002

 

Posts: 33
Joined: 2/14/2005
Status: offline

 
80040e14' - 2/28/2005 17:25:20   
Hi

I am using a Form that will take input from users. The query to ad the values to the database is like this:

sSQL = "INSERT into [users_tbl] ([name1], [lname], [mname], [addr], [cit], [sta], [zip], [phone], [phone2], [email], [selectday], [selectmon], [selectyear], [dateapp], [pos], [IP], [res]) values ('" & _
name1 & "', '" & lname & "', '" & mname & "', '" & addr & "', '" & cit& "', '" & sta & "', '" & zip & "', '" & phone & "', '" & phone2 & "','" & email & "', '" & selectday & "', '" & selectmon & "', '" & selectyear & "', '"&Now()&"', '"&pos&"' , '"&IP&"', '" & res & "')"


The res field is a memo field/data type.. When I insert values ..everything works finme..But if the values contain apostrophe (' )
eg: I tried to enter ghfsghdfasghd' "hsdgahs"
.
and it gave me this error

Microsoft JET Database Engine error '80040e14'

Syntax error (missing operator) in query expression ''ghfsghdfasghd' "hsdgahs" . ')'.

Please help...

Thanks
Singh
cliffdeen

 

Posts: 155
Joined: 4/12/2004
From: Mckinney, TX
Status: offline

 
RE: 80040e14' - 2/28/2005 19:06:32   
Not sure why you have so many &'s and double quotes, but a normal insert into a sql database is like so:
INSERT INTO USERS_TBL
(NAME1], [MNAME], etc)
VALUES
('::NAME1::', '::MNAME::', etc)

Note: insert names and values MUST match.


(in reply to prasmile2002)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: 80040e14' - 2/28/2005 19:17:42   
Cliff, thats the DRW format, with asp youll use "&" to create your string.

Singh , you need to use a function to replace the quotes.

eg :

Function NoQuote(input)
NoQuote = replace(input,"'","''")
End function

Then use that in your string for each variable:

'" &NoQuote(lname) & "', '" & NoQuote(mname) & "', '" & NoQuote(addr) & "', .....etc



_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to cliffdeen)
prasmile2002

 

Posts: 33
Joined: 2/14/2005
Status: offline

 
RE: 80040e14' - 3/1/2005 14:21:06   
Thanks..that works..

Singh

(in reply to Spooky)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> 80040e14'
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts