navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
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

Search Forums
 

Advanced search
Recent Posts

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

Microsoft MVP

 

help with AS - please!!!!!!

 
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 >> help with AS - please!!!!!!
Page: [1]
 
yogaboy

 

Posts: 377
Joined: 5/22/2004
Status: offline

 
help with AS - please!!!!!! - 10/26/2004 11:35:08   
I'm going crazeeeey! Have you ever tried searching the web for help with the AS operator???? It's virtually driven me to the point of no return.

Anyway, I have this bit of code

myFirstName = Request.Form("txtFirstName")

mySQL = "INSERT INTO Good_Practice (FirstName) VALUES " & myFirstName & "('AS FirstName')"

myConn.Execute(mySQL)


does anyone know why it isn't working??? The error is Syntax error in INSERT INTO statement.
rdouglass

 

Posts: 9167
From: Biddeford, ME USA
Status: offline

 
RE: help with AS - please!!!!!! - 10/26/2004 11:39:32   
quote:

mySQL = "INSERT INTO Good_Practice (FirstName) VALUES " & myFirstName & "('AS FirstName')"


Shouldn't that be this:

mySQL = "INSERT INTO Good_Practice VALUES (FirstName ='" & myFirstName & "')"

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to yogaboy)
yogaboy

 

Posts: 377
Joined: 5/22/2004
Status: offline

 
RE: help with AS - please!!!!!! - 10/26/2004 11:56:14   
Now the error is - Too few parameters. Expected 1.

Hmmm, I think I can feel my brain melting from frustration...

(in reply to rdouglass)
yogaboy

 

Posts: 377
Joined: 5/22/2004
Status: offline

 
RE: help with AS - please!!!!!! - 10/26/2004 12:21:17   
This works... but I still don't know how to use the AS operator (who cares!!!):)

mySQL = "INSERT INTO Good_Practice (FirstName) VALUES ('" & myFirstName & "')"

Thanks for the help, it pushed me in the right direction.

(in reply to yogaboy)
rdouglass

 

Posts: 9167
From: Biddeford, ME USA
Status: offline

 
RE: help with AS - please!!!!!! - 10/26/2004 12:26:26   
Sorry, I was using the UPDATE suntax...:):)

Actually AS is usually used in the SELECT clause something like this:

SELECT Count(UserName) AS CountOfUsers FROM myTable ...

< Message edited by rdouglass -- 10/26/2004 12:34:26 >


_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to yogaboy)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> help with AS - please!!!!!!
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