Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple update question 2

Status
Not open for further replies.

Sajtz

IS-IT--Management
Apr 23, 2002
75
EU
I'm trying to update my database. Look at this simple example.
<%
wonid_user = Session(&quot;username&quot;)
Uppdatera = &quot;SELECT * FROM users WHERE username = &quot;I want to know what to write here in order to get the value from wonid_user&quot;

%>
 
wonid_user = Session(&quot;username&quot;)
Uppdatera = &quot;SELECT * FROM users WHERE username = &quot; & wonid_user

hth Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
I get this error message when I use the code above:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

If I use this line
Uppdatera = &quot;SELECT * FROM users WHERE username = 'my_username' &quot;
it works just fine.. but then the username is not dymanic.
 
Uppdatera = &quot;SELECT * FROM users WHERE username = '&quot; & my_username & &quot;'&quot; Saturday 12.00
im6.gif
im2.gif
im2.gif
20.00
im5.gif
im4.gif
im7.gif
3.00am
im8.gif
Sunday [img http
 
sorry, assumed that wonid-user was a numeric field not alpha Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top