Wednesday, March 7, 2012
MSDE
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.BeginTrans
RS.Open "Employer",Conn,3,3
RS.AddNew
RS("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.Update
Conn.CommitTrans
RS.Close
Conn.Close
%>
</HEAD>
<BODY>
Member Registered
</BODY>
</HTML>
As mentioned I would be very grateful for any advice.
Love,
Joanne
What you'll need to do is grant permissions for the login you are
using in MSDE to the database, and then create a connection string
that contains valid credentials. For connection string syntax
examples, see either one of these two sites:
http://able-consulting.com/ADO_Conn.htm
http://www.connectionstrings.com
--Mary
On Mon, 17 May 2004 21:40:09 +0000 (UTC), "Joanne"
<bill884@.hotmail.com> wrote:
>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.BeginTrans
>RS.Open "Employer",Conn,3,3
>RS.AddNew
>RS("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.Update
>Conn.CommitTrans
>
>RS.Close
>Conn.Close
>%>
>
></HEAD>
><BODY>
>Member Registered
></BODY>
></HTML>
>
>As mentioned I would be very grateful for any advice.
>
>Love,
>
>Joanne
>
|||th syntax change here
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & "uid=;"pwd=;
biswajit das
-- Mary Chipman wrote: --
What you'll need to do is grant permissions for the login you are
using in MSDE to the database, and then create a connection string
that contains valid credentials. For connection string syntax
examples, see either one of these two sites:
http://able-consulting.com/ADO_Conn.htm
http://www.connectionstrings.com
--Mary
On Mon, 17 May 2004 21:40:09 +0000 (UTC), "Joanne"
<bill884@.hotmail.com> wrote:
>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.
>as follows: (which is setup for Jet at present)
>
MSDE
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:
<%@. 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.BeginTrans
RS.Open "Employer",Conn,3,3
RS.AddNew
RS("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.Update
Conn.CommitTrans
RS.Close
Conn.Close
%
</HEAD
<BODY
Member Registered
</BODY
</HTML
As mentioned I would be very grateful for any advice.
Love,
JoanneConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath &
";"
see
http://www.able-consulting.com/MDAC...Providers.htm#O
LEDBProviderForSQLServer
The code would be better with just an insert statement.
Even better calling a stored procedure with parameters.
Nigel Rivett
www.nigelrivett.net
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||Joanne (bill884@.hotmail.com) writes:
> 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.
Now, this sounds a bit funny to me. I've heard of people access SQL Server
databases from Access, but you want to do it the other way round from
you ASP code? (I assume what you post is ASP, but I don't know ASP, so
I could be wrong.) That does not seem very meaningful to me.
However, assuming that you in fact have a copy of the database that
you have migrated to SQL Server, then you could do:
> strDBPath=server.MapPath("Employer.mdb")
Remove this:
> Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath &
> ";"
Replace with:
Provider=SQLOLEDB;Integrated Security=SSPI;Initial Catalog=Employer
This assumes that you have MSDE running on the local server. If you
have MSDE on another machine, you should add Server=SERVERNAME to
the connection string.
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
MSDE
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.BeginTrans
RS.Open "Employer",Conn,3,3
RS.AddNew
RS("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.Update
Conn.CommitTrans
RS.Close
Conn.Close
%>
</HEAD>
<BODY>
Member Registered
</BODY>
</HTML>
As mentioned I would be very grateful for any advice.
Love,
JoanneWhat you'll need to do is grant permissions for the login you are
using in MSDE to the database, and then create a connection string
that contains valid credentials. For connection string syntax
examples, see either one of these two sites:
http://able-consulting.com/ADO_Conn.htm
http://www.connectionstrings.com
--Mary
On Mon, 17 May 2004 21:40:09 +0000 (UTC), "Joanne"
<bill884@.hotmail.com> wrote:
>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.BeginTrans
>RS.Open "Employer",Conn,3,3
>RS.AddNew
>RS("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.Update
>Conn.CommitTrans
>
>RS.Close
>Conn.Close
>%>
>
></HEAD>
><BODY>
>Member Registered
></BODY>
></HTML>
>
>As mentioned I would be very grateful for any advice.
>
>Love,
>
>Joanne
>|||th syntax change here
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & "uid
=;"pwd=;
biswajit das
-- Mary Chipman wrote: --
What you'll need to do is grant permissions for the login you are
using in MSDE to the database, and then create a connection string
that contains valid credentials. For connection string syntax
examples, see either one of these two sites:
http://able-consulting.com/ADO_Conn.htm
http://www.connectionstrings.com
--Mary
On Mon, 17 May 2004 21:40:09 +0000 (UTC), "Joanne"
<bill884@.hotmail.com> wrote:
>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.
>as follows: (which is setup for Jet at present)
>