Ask a Question related to ASP Database, Design and Development.
-
Matt #1
Help with OLEDB connection string
Hi,
I'm following the below example in order to create a connection to my Access
database. My question is, is it possible to include the username and
password as part of the connection string? I've tried appending
"UID=username;PWD=passsord" to the cst connection string, but I get a "Not a
Valid Account Name or Password" error.
Please don't shoot me down in flames, but the reason I'm trying to do this
is so that I can continue to use Dreamweaver in order to create my asp pages
(I know it code bloats, but I'm not doing anything fancy!). DW has the
ability of accepting a custom connection string and I'm trying to use this
rather than a DSN based one (at least I've learnt something from you guys
here!!!)
Help appreciated.
<%
cst = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
Server.MapPath("/<pathtofile.mdb>") & ";" & _
"Jet OLEDB:System Database=<wg_file_name>.mdw"
set conn = CreateObject("ADODB.Connection")
conn.open cst, "Username", "Password"
%>
Matt Guest
-
Dreamweaver ASP.NET OLEDB connection problem
have some Dreamweaver ASP .NET OLE DB connectin problem - I have "The connection was made susessfull" message but doesn't see any table in it. Can... -
Replacement for OLEDB connection in MX?
My ISP used to have Cold Fusion 5 running on their servers, allowing me to connect to databases via OLEDB connection: <CFSET... -
OLEDB connection string help
I'm trying to connect to a SQL Server using dsn-less connection string such as "PROVIDER=SQLOLEDB;DATA... -
OLEDB COnnection String to Oracle
Does someone know the proper connection string for using OLE DB connection to an oracle server ? Jon Spartan -
Connection string - ODBC vs OLEDB and Unspecified Error
This one has me stumped and I was wondering if anyone might have a solution... Using this connection string ... -
Foo Man Chew #2
Re: Help with OLEDB connection string
Are you actually using a password-protected workgroup file? If not, you
should just have:
<%
cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath("/path_to_file.mdb")
set conn = CreateObject("ADODB.Connection")
conn.open cst
%>
"Matt" <mystery@BarrysworldNoLongerWorks.com> wrote in message
news:OpEPyUvzDHA.3656@TK2MSFTNGP11.phx.gbl...Access> Hi,
>
> I'm following the below example in order to create a connection to mya> database. My question is, is it possible to include the username and
> password as part of the connection string? I've tried appending
> "UID=username;PWD=passsord" to the cst connection string, but I get a "Notpages> Valid Account Name or Password" error.
>
> Please don't shoot me down in flames, but the reason I'm trying to do this
> is so that I can continue to use Dreamweaver in order to create my asp> (I know it code bloats, but I'm not doing anything fancy!). DW has the
> ability of accepting a custom connection string and I'm trying to use this
> rather than a DSN based one (at least I've learnt something from you guys
> here!!!)
>
> Help appreciated.
>
> <%
> cst = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
> Server.MapPath("/<pathtofile.mdb>") & ";" & _
> "Jet OLEDB:System Database=<wg_file_name>.mdw"
> set conn = CreateObject("ADODB.Connection")
> conn.open cst, "Username", "Password"
> %>
>
>
Foo Man Chew Guest
-
Matt #3
Re: Help with OLEDB connection string
Yes - I am using a workgroup file as I provide different levels of access to
different groups of users.
"Foo Man Chew" <foo@man.chew> wrote in message
news:eXvq1XvzDHA.3900@tk2msftngp13.phx.gbl..."Not> Are you actually using a password-protected workgroup file? If not, you
> should just have:
>
> <%
> cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
> Server.MapPath("/path_to_file.mdb")
> set conn = CreateObject("ADODB.Connection")
> conn.open cst
> %>
>
>
>
>
>
> "Matt" <mystery@BarrysworldNoLongerWorks.com> wrote in message
> news:OpEPyUvzDHA.3656@TK2MSFTNGP11.phx.gbl...> Access> > Hi,
> >
> > I'm following the below example in order to create a connection to my> > database. My question is, is it possible to include the username and
> > password as part of the connection string? I've tried appending
> > "UID=username;PWD=passsord" to the cst connection string, but I get athis> a> > Valid Account Name or Password" error.
> >
> > Please don't shoot me down in flames, but the reason I'm trying to dothis> pages> > is so that I can continue to use Dreamweaver in order to create my asp> > (I know it code bloats, but I'm not doing anything fancy!). DW has the
> > ability of accepting a custom connection string and I'm trying to useguys> > rather than a DSN based one (at least I've learnt something from you>> > here!!!)
> >
> > Help appreciated.
> >
> > <%
> > cst = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
> > Server.MapPath("/<pathtofile.mdb>") & ";" & _
> > "Jet OLEDB:System Database=<wg_file_name>.mdw"
> > set conn = CreateObject("ADODB.Connection")
> > conn.open cst, "Username", "Password"
> > %>
> >
> >
>
Matt Guest
-
Bob Barrows #4
Re: Help with OLEDB connection string
According to [url]www.able-consulting.com/ado_conn.htm[/url], this is the correct
syntax for a workgroup-protected database:
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\somepath\mydb.mdb;" & _
"Jet OLEDB:System Database=MySystem.mdw", _
"myUsername", "myPassword"
HTH,
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup
Matt wrote:> Yes - I am using a workgroup file as I provide different levels of
> access to different groups of users.
>
> "Foo Man Chew" <foo@man.chew> wrote in message
> news:eXvq1XvzDHA.3900@tk2msftngp13.phx.gbl...>> Are you actually using a password-protected workgroup file? If not,
>> you should just have:
>>
>> <%
>> cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
>> Server.MapPath("/path_to_file.mdb")
>> set conn = CreateObject("ADODB.Connection")
>> conn.open cst
Bob Barrows Guest



Reply With Quote

