 | 
September 10th, 2008, 06:53 PM
| | Newbie | | Join Date: Sep 2008
Posts: 6
| | Microsoft VBScript runtime error '800a01a8'
Hi folks,
I am a bit new to asp, and I am trying to get my form to write to an Access DB and send a confirmation email to the user when they submit the form.
I am getting this error:
[BMicrosoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xe34 Thread 0xac0 DBC 0xd03c00c Jet'.
/formaction.asp, line 55
[/b]
Here is my code: - #51 <%
-
#52 Dim conn, rs
-
#53 Set conn=Server.CreateObject("ADODB.Connection")
-
#54 Set rs=Server.CreateObject("ADODB.Recordset")
-
#55 conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=URL=fpdb/default4.mdb"
-
#57
-
#58 rs.Open "default4.mdb", conn, 2, 3
-
#59 rs.addnew
-
#60 rs("inputname")=Request.Form("Name")
-
#61 rs("inputname")=Request.Form("Email")
-
#62 rs("inputname")=Request.Form("Title")
-
#63 rs("inputname")=Request.Form("Dealership")
-
#64 rs("inputname")=Request.Form("Feb23_Reception")
-
#65 rs("inputname")=Request.Form("Feb24_Business_Meetings")
-
#66 rs("inputname")=Request.Form("Feb24_AB_VIP_Tour")
-
#67 rs("inputname")=Request.Form("Feb25_Business_Meetings")
I have a global.asa file, but I don't know enough .asp to make this work and I have been scouring the Internet for days.
Any wisdom, guidance and/or help would be greatly appreciated.
Thanks,
Jim
| 
September 11th, 2008, 09:22 AM
|  | Familiar Sight | | Join Date: Nov 2006
Posts: 227
| |
hi Jim,
use this way and to connect to your access database and the connection string would be this one here -
Set rs=Server.CreateObject("ADODB.Recordset")
-
Set conn=Server.CreateObject("ADODB.Connection")
-
conn="Provider=Microsoft.Jet.OLEDB.4.0; Data Source="&server.mappath("fpdb/default4.mdb")
-
sql_string="select * from table;"
-
rs.CursorType = 2
-
rs.LockType = 3
-
rs.open sql_string,conn,3
-
rs.addnew
-
rs.fields("inputname")=Request.Form("Name")
-
rs.fields("inputname")=Request.Form("Email")
-
rs.fields("inputname")=Request.Form("Title")
-
rs.fields("inputname")=Request.Form("Dealership")
-
rs.fields("inputname")=Request.Form("Feb23_Reception")
-
rs.fields("inputname")=Request.Form("Feb24_Business_Meetings")
-
rs.fields("inputname")=Request.Form("Feb24_AB_VIP_Tour")
-
rs.fields("inputname")=Request.Form("Feb25_Business_Meetings")
-
rs.update
-
rs.close
-
tell me if there is any error using this method its been 5 years i have known asp and i have tried all the ways and all the connection strings and this method was the only one that never gave me any problems ......NEVER
Regards,
Omer Aslam
| 
September 11th, 2008, 03:45 PM
| | Newbie | | Join Date: Sep 2008
Posts: 6
| |
Hi Omer,
Thank you very much for your reply. I inserted your code, but I got a new error: Microsoft JET Database Engine error '80040e14'
Syntax error in FROM clause.
/formaction.asp, line 58
Here is my complete code... I am trying to write to an Access db and generate a confirmation email to the registrant, in case I didn't mention it in my other post. - <%
-
Set rs=Server.CreateObject("ADODB.Recordset")
-
Set conn=Server.CreateObject("ADODB.Connection")
-
conn="Provider=Microsoft.Jet.OLEDB.4.0; Data Source="&server.mappath("fpdb/default4.mdb")
-
sql_string="select * from table;"
-
rs.CursorType = 2
-
rs.LockType = 3
-
rs.open sql_string,conn,3
-
rs.addnew
-
rs.fields("inputname")=Request.Form("Name")
-
rs.fields("inputname")=Request.Form("Email")
-
rs.fields("inputname")=Request.Form("Title")
-
rs.fields("inputname")=Request.Form("Dealership")
-
rs.fields("inputname")=Request.Form("Feb23_Reception")
-
rs.fields("inputname")=Request.Form("Feb24_Business_Meetings")
-
rs.fields("inputname")=Request.Form("Feb24_AB_VIP_Tour")
-
rs.fields("inputname")=Request.Form("Feb25_Business_Meetings")
-
rs.fields("inputname")=Request.Form("CAT_Update")
-
rs.fields("inputname")=Request.Form("NACD_Update")
-
rs.fields("inputname")=Request.Form("Power_Systems")
-
rs.fields("inputname")=Request.Form("CAT_Financial")
-
rs.fields("inputname")=Request.Form("Product_Support")
-
rs.fields("inputname")=Request.Form("CAT_Panel_Discussion")
-
rs.fields("inputname")=Request.Form("CAT_Path_to_2010_Goals")
-
rs.fields("inputname")=Request.Form("Rental_Used_Update")
-
rs.fields("inputname")=Request.Form("Dealer_Breakout_Session")
-
rs.fields("inputname")=Request.Form("Dealer_Best_Practices")
-
rs.fields("inputname")=Request.Form("Best_Practices_Ideas")
-
rs.fields("inputname")=Request.Form("Add_Topics")
-
-
rs.Update
-
rs.MoveLast
-
strId=rs("id")
-
-
rs.Close
-
conn.Close
-
Set rs=nothing
-
Set conn=nothing
-
Response.Write "ID#: " & strId
-
%>
Thanks again for your reply.
Jim
| 
September 11th, 2008, 05:36 PM
| | Newbie | | Join Date: Sep 2008
Posts: 6
| |
Let me update this line number to avoid any confusion...
Line 58 actually = rs.open sql_string,conn,3
I just caught that...
Thanks again,
Jim
| 
September 11th, 2008, 08:14 PM
|  | Moderator | | Join Date: Jan 2008 Location: Winchester, UK
Posts: 926
| |
Jim, there's a SQL syntax error in your SQL string. It looks pretty simple though so not sure what could be causing it - is "table" actually the name of your table?
Dr B
| 
September 11th, 2008, 08:37 PM
| | Newbie | | Join Date: Sep 2008
Posts: 6
| |
Dr B,
The name of the table is Results. I changed to Results from table, and now I get this error: - ADODB.Recordset error '800a0cc1'
-
-
Item cannot be found in the collection corresponding to the requested name or ordinal.
-
-
/formaction.asp, line 60
Code for line 60 = rs.fields("inputname")=Request.Form("Name")
Thanks very much,
Jim Quote: |
Originally Posted by DrBunchman Jim, there's a SQL syntax error in your SQL string. It looks pretty simple though so not sure what could be causing it - is "table" actually the name of your table?
Dr B | | 
September 11th, 2008, 09:11 PM
|  | Moderator | | Join Date: Jan 2008 Location: Winchester, UK
Posts: 926
| |
Jim,
Then there is no column called "inputname" in your table Results. Make sure that all the fields that you are trying to update exist in your table and are spelt correctly.
Hope this helps,
Dr B
| 
September 12th, 2008, 04:27 PM
| | Newbie | | Join Date: Sep 2008
Posts: 6
| |
OK, thanks DrB... I think I am getting close... here is my current code: - <%
-
Set rs=Server.CreateObject("ADODB.Recordset")
-
Set conn=Server.CreateObject("ADODB.Connection")
-
conn="Provider=Microsoft.Jet.OLEDB.4.0; Data Source="&server.mappath("fpdb/default4.mdb")
-
sql_string="select * from [Results]"
-
rs.CursorType = 2
-
rs.LockType = 3
-
rs.open sql_string,conn,3
-
rs.addnew
-
rs.fields("Name")=Request.Form("Name")
-
rs.fields("Email")=Request.Form("Email")
-
rs.fields("Title")=Request.Form("Title")
-
rs.fields("Dealership")=Request.Form("Dealership")
-
rs.fields("Feb23_Reception")=Request.Form("Feb23_Reception")
-
rs.fields("Feb24_Business_Meetings")=Request.Form("Feb24_Business_Meetings")
-
rs.fields("Feb24_AB_VIP_Tour")=Request.Form("Feb24_AB_VIP_Tour")
-
rs.fields("Feb25_Business_Meetings")=Request.Form("Feb25_Business_Meetings")
-
rs.fields("CAT_Update")=Request.Form("CAT_Update")
-
rs.fields("NACD_Update")=Request.Form("NACD_Update")
-
rs.fields("Power_Systems")=Request.Form("Power_Systems")
-
rs.fields("CAT_Financial")=Request.Form("CAT_Financial")
-
rs.fields("Product_Support")=Request.Form("Product_Support")
-
rs.fields("CAT_Panel_Discussion")=Request.Form("CAT_Panel_Discussion")
-
rs.fields("CAT_Path_to_2010_Goals")=Request.Form("CAT_Path_to_2010_Goals")
-
rs.fields("Rental_Used_Update")=Request.Form("Rental_Used_Update")
-
rs.fields("Dealer_Breakout_Session")=Request.Form("Dealer_Breakout_Session")
-
rs.fields("Dealer_Best_Practices")=Request.Form("Dealer_Best_Practices")
-
rs.fields("Best_Practices_Ideas")=Request.Form("Best_Practices_Ideas")
-
rs.fields("Add_Topics")=Request.Form("Add_Topics")
-
-
rs.Update
-
rs.MoveLast
-
strId=rs("id")
-
-
rs.Close
-
conn.Close
-
Set rs=nothing
-
Set conn=nothing
-
Response.Write "ID#: " & strId
-
%>
*Line 86 = Line 36 here
However, now I am getting this error: Microsoft VBScript runtime error '800a01a8'
Object required: 'Provider=Microsoft.J'
/formaction.asp, line 86
Thanks for all your help!
Jim Quote: |
Originally Posted by DrBunchman Jim,
Then there is no column called "inputname" in your table Results. Make sure that all the fields that you are trying to update exist in your table and are spelt correctly.
Hope this helps,
Dr B | | 
September 15th, 2008, 09:04 AM
|  | Familiar Sight | | Join Date: Nov 2006
Posts: 227
| |
just remove Conn.close from your code you dont need to close the connection ,you already closing the recordset so its okay
| 
September 17th, 2008, 03:59 PM
| | Newbie | | Join Date: Sep 2008
Posts: 6
| |
That did it! Thanks very much for all your help...:)
Jim Quote: |
Originally Posted by omerbutt just remove Conn.close from your code you dont need to close the connection ,you already closing the recordset so its okay | |  | | Thread Tools | Search this Thread | | | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 204,687 network members.
|