Hello,
I tried but it doesn't work. Please see my code above. I just want newly made id to insert into my id table.
User Profile
Collapse
-
junction table
Hello,
I have a questinarrie webform I use INSERT statement(s) to insert a new record in the User and Questions tables and then (HERE IS MY PROBLEM) I need to update my junction table (QuestionScores - has two fields; questionid and scoreID).
What should be a statement to update my junction table?
This is my code except updates to junction table:
...Code:<% ' Declaring variables Dim tmpFullName,
-
Hello,
Just for the sake of testing I changed it to string and still the same error message. I don'w know what else to try.
debLeave a comment:
-
Hello,
Age is a string, dateDB is Date/Time in my database.
I just changed my script, AGAIN, (changed field names) to avoid this message I am gettting (but didn't help):
------------------------------------------------
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Reserved error (|); there is no message for this error.
...Leave a comment:
-
Hello Experts
I followed Mark's advise and I got this message: I am attaching my access database (I stripped all the unnecessary parts from it).
_______________ _______________ _______________ ______
Microsoft VBScript compilation error '800a03fd'
Expected 'Case'
/2000040101/form_ac.asp, line 33
...Code:SELECT users.form, Diagnosis.form, Type FROM users JOIN Diagnosis ON users.idName = Diagnosis.idName
Leave a comment:
-
Hi Jared,
I already tried this... same message I received :-)
Error is coming from line 34:
DebCode:SQL = "insert into Diagnosis (QuestionOne, idName) values ('" & QuestionOne & "', (SELECT idName FROM users WHERE name = '" & name & "' AND age = '"& age & "' AND dateDB = '"& dateDB & "'))"Leave a comment:
-
Hello Jared,
This is updated code and I am still receiving same error message (idName is autonumber):
[code=asp]<%
' Declaring variables
Dim name, age, dateDB, QuestionOne, data_source, con, conOne, sql_insert, sql_insertOne
' A Function to check if some field entered by user is empty
Function ChkString(strin g)
If string = "" Then
...Last edited by jhardman; Feb 22 '08, 12:08 AM. Reason: put code in code tags. Please note button marked - #Leave a comment:
-
Hi CroCrew,
table users:
idName
name
age
dateDB
table:
Diagnosis:
idName
QuestionOne
They are linke by idName.
Thank you very much for your help.
DebbieLeave a comment:
-
Hello,
Thank you very much for your reply. I pasted the code above and this is a message I am getting: (two tables are linked by idName)
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] You cannot add or change a record because a related record is required in table 'users'.
/2000040101/form_ac.asp, line 34
I would greatly appreciate...Leave a comment:
-
insert into syntax
I have problems writing data from my webform to two linked tables. I am quiet sure that my insert into syntax is not correct. Please take a look if you have a moment, if not I understand:
[code=asp]
<%
' Declaring variables
Dim name, age, dateDB, QuestionOne, data_source, con, conOne, sql_insert, sql_insertOne
' A Function to check if some field entered by user is empty
Function...Last edited by jhardman; Feb 21 '08, 11:00 PM. Reason: put code in code tags. Please note button marked - #
No activity results to display
Show More
Leave a comment: