Just use the standard conection string way of connecting to access ala
http://www.learnasp.com/learn/dbopen.asp
q-"'"
strSQL = "Insert INTO answers ("
strSQL2="VALUES ("
strSQL = strSQL & "[subnum]"
strSQL2 = strSQL2 & q & request.form("subnum") & q
strSQL = strSQL & ",[mpt]"
strSQL2 = strSQL2 & q & request.form("mpt") & q
strSQL = strSQL & ",[mpr02]"
strSQL2 = strSQL2 & q & request.form("mpr02") & q
....
strSQL = strSQL & ",[mpt12]"
strSQL2 = strSQL2 & q & request.form("mpt12") & q
strSQL = strSQL & ") " & strSQL2 & ")"
OR OR OR a better way
strSQL = strSQL & ",[mpt]"
strSQL2 = strSQL2 & q & request.form("mpt") & q
strSQL = strSQL & ",[mpr02]"
strSQL2 = strSQL2 & q & request.form("mpr02") & q
....
strSQL = strSQL & ",[mpt12]"
strSQL2 = strSQL2 & q & request.form("mpt12") & q
can be replaced with
FOR counter=2 To 12
if counter <10 then
paddedcounter="0" & counter
else
paddedcounter=counter
end if
strSQL = strSQL & ",[mpr" & paddedcounter & "]"
strSQL2 = strSQL2 & q & request.form("mpr" & paddedcounter) & q
NEXT
On Fri, 14 Jan 2005 12:56:48 -0800 (PST), Craig
<[EMAIL PROTECTED]> wrote:
> That took me from pretty close do done to having to
> recode pretty much all of my design. That's fine but I
> don't have any clue on most of what you said or what
> that webpage is trying to change me to do other than
> how the data is entered into the db.
>
>
> I don't have it set for a DSN uid/pwd
> ******************************
> <%
> on error resume next
> myDSN = "DSN=Student;uid=student;pwd=magic"
> Set Conn = Server.CreateObject("ADODB.Connection")
> conn.open myDSN
> ******************************
> I'm guessing this is the info that was posted on the
> last page. Do I put <lname=%value%> ?
> ******************************
> SQL="update test set
> fname='Ted',lname='Wilson',city='Rockville',state='MD',zip='20849',rank=7,datehire='1/15/92',
> SSN='219-92-2677' WHERE personid=7"
> ******************************
> No clue what this is, what it's doing or how to edit
> it
> ******************************
> Conn.Execute SQL,howmany
> IF howmany="" THEN
> howmany=0
> END IF
> response.write "Affected <b>" & howmany & "</b>
> records<br>"
> Call SQLerrorreport(SQL,conn)
> ******************************
> Understand this is the variables in the table
> ******************************
> SQL="Insert Into junk
> (fname,lname,city,state,zip,rank,datehire,ssn)
> ******************************
> Understand these are the submitted values - do i put
> in VALUES (',',',') ?
> ******************************
> VALUES ('ted','wilson','rockville', 'md',
> '20849',7,'1/15/92','219-92-2677')"
> ******************************
> No clue what this is doing or how it should be edited
> ******************************
> Conn.Execute SQL,howmany
> IF howmany="" THEN
> howmany=0
> END IF
> ******************************
> No clue what this is doing
> ******************************
> response.write "Affected <b>" & howmany & "</b>
> records</b><br>"
> Call SQLerrorreport(SQL,conn)
>
> Conn.Close
> set conn=nothing
> %>
> </body></html>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
> ________________________________
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
>
> To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/