User Profile

Collapse

Profile Sidebar

Collapse
dbertanjoli
dbertanjoli
Last Activity: Jun 23 '08, 10:20 PM
Joined: Feb 20 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • dbertanjoli
    replied to junction table
    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.
    See more | Go to post

    Leave a comment:


  • dbertanjoli
    started a topic junction table

    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,
    ...
    See more | Go to post
    Last edited by DrBunchman; Apr 19 '08, 12:30 AM. Reason: Added code tags - note the # button

  • dbertanjoli
    replied to insert into syntax
    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.
    deb
    See more | Go to post

    Leave a comment:


  • dbertanjoli
    replied to insert into syntax
    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.

    ...
    See more | Go to post

    Leave a comment:


  • dbertanjoli
    replied to insert into syntax
    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
    ...
    See more | Go to post

    Leave a comment:


  • dbertanjoli
    replied to insert into syntax
    Hi Jared,
    I already tried this... same message I received :-)

    Error is coming from line 34:
    Code:
    SQL =  "insert into Diagnosis (QuestionOne, idName) values ('" & QuestionOne & "', (SELECT idName FROM users WHERE name = '" & name & "' AND age = '"& age & "' AND dateDB = '"& dateDB & "'))"
    Deb
    See more | Go to post

    Leave a comment:


  • dbertanjoli
    replied to insert into syntax
    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
    ...
    See more | Go to post
    Last edited by jhardman; Feb 22 '08, 12:08 AM. Reason: put code in code tags. Please note button marked - #

    Leave a comment:


  • dbertanjoli
    replied to insert into syntax
    Hi CroCrew,

    table users:
    idName
    name
    age
    dateDB

    table:
    Diagnosis:
    idName
    QuestionOne

    They are linke by idName.

    Thank you very much for your help.

    Debbie
    See more | Go to post

    Leave a comment:


  • dbertanjoli
    replied to insert into syntax
    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...
    See more | Go to post

    Leave a comment:


  • dbertanjoli
    started a topic insert into syntax

    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...
    See more | Go to post
    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
Working...