Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
joannex
Starting Member
1 Post |
Posted - 2004-05-17 : 18:11:48
|
I would appreciate any help, I’m trying to connect a web front-end to an Access 2000 database using MSDE, and I have it working using Jet but would like to connect the database using MSDE.I would appreciate any advice to where I need to edit the code, the code is as follows: (which is setup for Jet at present)<%@ Language=VBScript %><HTML><HEAD><TITLE>Add New Record</TITLE><%strDBPath=server.MapPath("Employer.mdb")Set Conn = Server.CreateObject("ADODB.Connection")Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & ";"set RS = Server.CreateObject("ADODB.Recordset")Conn.BeginTransRS.Open "Employer",Conn,3,3RS.AddNewRS("Employer ID") = Request("Employer ID")RS("Employer Name") = Request("Employer Name")RS("TitleID") = Request("TitleID")RS("Forename") = Request("Forename")RS("Surname") = Request("Surname")RS("Web Address") = Request("Web Address")RS("Email Address") = Request("Email Address")RS("Date Recorded") = Request("Date Recorded")RS("Employer ClassificationID") = Request("Employer ClassificationID")RS.UpdateConn.CommitTransRS.CloseConn.Close%></HEAD><BODY>Member Registered</BODY></HTML>As mentioned I would be very grateful for any advice.Love,Joanne |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-05-17 : 18:25:03
|
Set Conn = Server.CreateObject("ADODB.Connection")Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & ";"set RS = Server.CreateObject("ADODB.Recordset")seehttp://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForSQLServerAlso consider getting rid of the addnew and update in favour of an insert or call to a stored procedure.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
|
|
|