middletree
Sun Aug 31 22:54:18 CDT 2003
I hadn't tried yet when I posted that. Was looking to see if there was
something obviously wrong.
As it turned out, it failed, but I have no idea why. What's more, it doesn't
seem to have anything to do with identity.
Here's the error:
a.. Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open
registry key 'Temporary (volatile) Jet DSN for process 0x3b8 Thread 0x65c
DBC 0x1774064 Jet'.
/grace/shapethankyou.asp, line 11
Where line 11 is:
objRecordset.Open "Shape", DB_CONNECTIONSTRING, adOpenStatic,
adLockPessimistic, adCmdTable
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:#Yuh15$bDHA.1656@TK2MSFTNGP10.phx.gbl...
> have you tried? was there an error?
>
> I'm not sure that Access has the "@@identity"....
>
> I'd suggest trying and posting the specific errors.
>
> --
> ----------------------------------------------------------
> Curt Christianson (Software_AT_Darkfalz.Com)
> Owner/Lead Designer, DF-Software
>
http://www.Darkfalz.com
> ---------------------------------------------------------
> ..Offering free scripts & code snippits for everyone...
> ---------------------------------------------------------
>
>
> "middletree" <middletree@htomail.com> wrote in message
> news:uCKy63$bDHA.620@TK2MSFTNGP11.phx.gbl...
> > I am used to SQL Server, no Access, but this one thing has to be done in
> > Access. Can you tell me if this query will work, based on the syntax?
> >
> > I am trying create a new row on the database, in one table, and the
> primary
> > key is an Autonumber called PersonalID. This is on the second page,
which
> > shows after the personal has filled out some info on the first page,
then
> > submitted the form using POST. Database name is Shape, and table is
named
> > Personal.
> >
> >
> > -----------------------------------------------------------------------
> > DB_CONNECTIONSTRING = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" &
_
> > Server.Mappath("Shape.mdb") & ";"
> >
> > Set objRecordset = Server.CreateObject("ADODB.Recordset")
> > objRecordset.Open "Shape", DB_CONNECTIONSTRING, adOpenStatic,
> > adLockPessimistic, adCmdTable
> >
> > strFirstName = Replace(Trim(Request.Form("FirstName")),"'","''")
> > strLastname = Replace(Trim(Request.Form("LastName")),"'","''")
> >
> > strSQL = "set nocount on; INSERT INTO Personal(FirstName,LastName)
> VALUES
> > (strFirstName,strLastName); select @@identity [newid];"
> > Set rs=objConnection.execute (strSQL)
> > strPersonalID = RS("newid")
> > rs.Close
> >
> >
>
>