Ask a Question related to ASP Database, Design and Development.
-
djc #1
connection string problem (going nutz)
Can someone please provide me with an example conntection string to connect
to an access database that is using jet security (mdw file)?
I want to use Internet Explorer and asp/ado to connect to an access database
and I have not been successfull in even connecting to it. The only way I got
it to work was using a system DSN and it only worked intermittently?
I have found 3 different syntax examples from microsoft and could get none
of them to work. I think maybe they were for access/ado instead of asp/ado.
I'm not sure. But I would really love a simple example of the correct syntax
for what I need to do
anyone?
Thanks in advance!
djc Guest
-
need help with connection string
i keep reading that it is not secure to hard code the connection string to the server into my swf. so how can i get the string into my swf without... -
WebServiceConnector driven me nutz
I am having the exact same problem as you are. I have tried everything including uninstalling Flash MX Professional. Any ideas...anyone?:disgust; -
connection string
Hi there, I have recently changed the connection string on a site that was working perfectly. I used an OLE DB connection with this code: var... -
problem defining a custom connection string
Hi, could someone please help with a problem I am having. When I try to create a connection string using DW's custom connection string... -
Global.asa - Driving me nutz
the ASA is in the ROOT of the VirtDit Application. Make sure that the Application is created. --... -
Ray at #2
Re: connection string problem (going nutz)
"djc" <noone@nowhere.com> wrote in message
news:%23vSuJqzlDHA.1084@tk2msftngp13.phx.gbl...connect> Can someone please provide me with an example conntection string to[url]www.connectionstrings.com[/url]> to an access database that is using jet security (mdw file)?
Use the oledb one.
Ray at work
Ray at Guest
-
Tom Kaminski [MVP] #3
Re: connection string problem (going nutz)
"djc" <noone@nowhere.com> wrote in message
news:%23vSuJqzlDHA.1084@tk2msftngp13.phx.gbl...connect> Can someone please provide me with an example conntection string todatabase> to an access database that is using jet security (mdw file)?
>
> I want to use Internet Explorer and asp/ado to connect to an accessgot> and I have not been successfull in even connecting to it. The only way Iasp/ado.> it to work was using a system DSN and it only worked intermittently?
>
> I have found 3 different syntax examples from microsoft and could get none
> of them to work. I think maybe they were for access/ado instead ofsyntax> I'm not sure. But I would really love a simple example of the correctIf you shared with us exactly what "could get none of them to work" means,> for what I need to do
>
> anyone?
we may be able to provide you an answer as to how to get it to work ...
--
Tom Kaminski IIS MVP
[url]http://www.iistoolshed.com/[/url] - tools, scripts, and utilities for running IIS
[url]http://mvp.support.microsoft.com/[/url]
[url]http://www.microsoft.com/windowsserver2003/community/centers/iis/[/url]
Tom Kaminski [MVP] Guest
-
McKirahan #4
Re: connection string problem (going nutz)
"djc" <noone@nowhere.com> wrote in message
news:#vSuJqzlDHA.1084@tk2msftngp13.phx.gbl...connect> Can someone please provide me with an example conntection string todatabase> to an access database that is using jet security (mdw file)?
>
> I want to use Internet Explorer and asp/ado to connect to an accessgot> and I have not been successfull in even connecting to it. The only way Iasp/ado.> it to work was using a system DSN and it only worked intermittently?
>
> I have found 3 different syntax examples from microsoft and could get none
> of them to work. I think maybe they were for access/ado instead ofsyntax> I'm not sure. But I would really love a simple example of the correct> for what I need to do
>
> anyone?
>
> Thanks in advance!
Will this code help?
<% @Language = "VBScript" %>
<% Option Explicit
'*
'* Declare Constants
'*
Const cASP = "accessor.asp"
Const cDSN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
Const cMDB = "your_access_database.mdb"
Const cTBL = "your_table_name"
'*
'* Declare Variables
'*
Dim strDSN
strDSN = cDSN & Server.MapPath(cMDB)
Dim intRST
intRST = 0
Dim strSQL
strSQL = "SELECT * FROM " & cTBL
Response.Write("<br>" & strSQL)
'*
'* Declare Objects
'*
Dim objADO
Set objADO = Server.CreateObject("ADODB.Connection")
objADO.Open strDSN
Dim objRST
Set objRST = objADO.Execute(strSQL)
'*
'* Process
'*
Do While Not objRST.EOF
intRST = intRST + 1
'...
objRST.MoveNext
Loop
Response.Write("<br>" & intRST & " records read")
'*
'* Cleanup Objects
'*
Set objRST = Nothing
Set objADO = Nothing
%>
McKirahan Guest
-
djc #5
Re: connection string problem (going nutz)
thanks ray.
this is copy/pasted from that site:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet
OLEDB:System Database=system.mdw;","admin", ""
The placement of the quotes are confusing me. Here is my connection string:
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=C:\websvr\aspadotest.mdb;" _
& "Jet OLEDB:System database=C:\tech.mdw;" _
& "," & """" & "dsmith" & """" & "," & """" & "password" &
""""
Do you know whats wrong with this?
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:eh9PjszlDHA.964@TK2MSFTNGP10.phx.gbl...>
> "djc" <noone@nowhere.com> wrote in message
> news:%23vSuJqzlDHA.1084@tk2msftngp13.phx.gbl...> connect> > Can someone please provide me with an example conntection string to>> > to an access database that is using jet security (mdw file)?
> [url]www.connectionstrings.com[/url]
>
> Use the oledb one.
>
> Ray at work
>
>
djc Guest
-
Bob Barrows #6
Re: connection string problem (going nutz)
djc wrote:
This does not seem right. Here's an example from> thanks ray.
>
> this is copy/pasted from that site:
>
> "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet
> OLEDB:System Database=system.mdw;","admin", ""
[url]www.able-consulting.com/ado_conn.htm:[/url]
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\somepath\mydb.mdb;" & _
"Jet OLEDB:System Database=MySystem.mdw", _
"myUsername", "myPassword"
Give this a try.
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.
Bob Barrows Guest
-
djc #7
Re: connection string problem (going nutz)
That did it! THANK YOU!
"Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote in message
news:OSyD6m0lDHA.1764@tk2msftngp13.phx.gbl...> djc wrote:>> > thanks ray.
> >
> > this is copy/pasted from that site:
> >
> > "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet
> > OLEDB:System Database=system.mdw;","admin", ""
> This does not seem right. Here's an example from
> [url]www.able-consulting.com/ado_conn.htm:[/url]
> oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
> "Data Source=c:\somepath\mydb.mdb;" & _
> "Jet OLEDB:System Database=MySystem.mdw", _
> "myUsername", "myPassword"
>
> Give this a try.
>
> 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.
>
>
djc Guest
-
djc #8
Re: connection string problem (going nutz)
sorry for the lack of detail. Bob Barrows reply had an example that was
clearer than what I was using. It was a syntax error...
thanks for the reply.
"Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> wrote in message
news:bn1b7d$m1b9@kcweb01.netnews.att.com...none> "djc" <noone@nowhere.com> wrote in message
> news:%23vSuJqzlDHA.1084@tk2msftngp13.phx.gbl...> connect> > Can someone please provide me with an example conntection string to> database> > to an access database that is using jet security (mdw file)?
> >
> > I want to use Internet Explorer and asp/ado to connect to an access> got> > and I have not been successfull in even connecting to it. The only way I> > it to work was using a system DSN and it only worked intermittently?
> >
> > I have found 3 different syntax examples from microsoft and could getIIS> asp/ado.> > of them to work. I think maybe they were for access/ado instead of> syntax> > I'm not sure. But I would really love a simple example of the correct>> > for what I need to do
> >
> > anyone?
> If you shared with us exactly what "could get none of them to work" means,
> we may be able to provide you an answer as to how to get it to work ...
>
> --
> Tom Kaminski IIS MVP
> [url]http://www.iistoolshed.com/[/url] - tools, scripts, and utilities for running> [url]http://mvp.support.microsoft.com/[/url]
> [url]http://www.microsoft.com/windowsserver2003/community/centers/iis/[/url]
>
>
>
djc Guest
-
djc #9
Re: connection string problem (going nutz)
wow. Thanks for the detail. I actually (with the help of Bob Barrow's reply)
found a syntax error in my connection string.
I will however try out your code as well.
Thanks!
"McKirahan" <News@McKirahan.com> wrote in message
news:UTWkb.510232$2x.216351@rwcrnsc52.ops.asp.att. net...none> "djc" <noone@nowhere.com> wrote in message
> news:#vSuJqzlDHA.1084@tk2msftngp13.phx.gbl...> connect> > Can someone please provide me with an example conntection string to> database> > to an access database that is using jet security (mdw file)?
> >
> > I want to use Internet Explorer and asp/ado to connect to an access> got> > and I have not been successfull in even connecting to it. The only way I> > it to work was using a system DSN and it only worked intermittently?
> >
> > I have found 3 different syntax examples from microsoft and could get> asp/ado.> > of them to work. I think maybe they were for access/ado instead of> syntax> > I'm not sure. But I would really love a simple example of the correct>> > for what I need to do
> >
> > anyone?
> >
> > Thanks in advance!
>
> Will this code help?
>
> <% @Language = "VBScript" %>
> <% Option Explicit
> '*
> '* Declare Constants
> '*
> Const cASP = "accessor.asp"
> Const cDSN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
> Const cMDB = "your_access_database.mdb"
> Const cTBL = "your_table_name"
> '*
> '* Declare Variables
> '*
> Dim strDSN
> strDSN = cDSN & Server.MapPath(cMDB)
> Dim intRST
> intRST = 0
> Dim strSQL
> strSQL = "SELECT * FROM " & cTBL
> Response.Write("<br>" & strSQL)
> '*
> '* Declare Objects
> '*
> Dim objADO
> Set objADO = Server.CreateObject("ADODB.Connection")
> objADO.Open strDSN
> Dim objRST
> Set objRST = objADO.Execute(strSQL)
> '*
> '* Process
> '*
> Do While Not objRST.EOF
> intRST = intRST + 1
> '...
> objRST.MoveNext
> Loop
> Response.Write("<br>" & intRST & " records read")
> '*
> '* Cleanup Objects
> '*
> Set objRST = Nothing
> Set objADO = Nothing
> %>
>
>
djc Guest



Reply With Quote

