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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

When I try to write a new record to

Status
Not open for further replies.

streborr

IS-IT--Management
Jan 16, 2002
98
When I try to write a new record to the database, 4 of the 5 fields are being written to one field in the db!

The "Username" field is being filled with Username, Topic, Email and Suggestions, the "When:filed is being filled correctly

Here's the line:

Set oRS = oConn.Execute("INSERT INTO Suggestions (Username, Topic, Email, Suggestion, When) VALUES ('" & Username & "', '" & Topic & "', '" & Email & "', '" & Suggestion & "', '" & Now() & "')")

Where am I screwing up?
Thanks


"Without deviation, progress is not possible."
Frank Zappa
 
It looks fine to me.

If you're using Access as your database then you might try putting # signs around the date (Now()) rather than single quotes, but other than that nothing seems wrong at all.
 
I found the problem.
I had the input fields all named the same. duh

New problem!

The a comma is being added to the end of the username in the db. I did a search in the code for all instances of a "," but everything looked fine. Even when I do a response.write, the comma doesn't show up.
What's causing the comma to be added?

Thanks All!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top