Professional Web Applications Themes

Provider error? - ASP

What is GetConnectionString? A function? Where is it? What does it say? Ray at work "Dean J. Garrett" <deanj_garrett> wrote in message news:%23R8dSNvUDHA.964TK2MSFTNGP09.phx.gbl... > We have a simple website set-up with IIS5.0 that uses an Access database. > About 2 times per week, the website stops working, and when we go to the > home page, the following error displays: > > -------------------------------------- > Provider error '80004005' > > Unspecified error > > /Default.asp, line 11 > -------------------------------------- > > Here's the code in default.asp. The error is in the dbConn.Open. In order > to fix the problem, I do ...

  1. #1

    Default Re: Provider error?

    What is GetConnectionString? A function? Where is it? What does it say?

    Ray at work

    "Dean J. Garrett" <deanj_garrett> wrote in message
    news:%23R8dSNvUDHA.964TK2MSFTNGP09.phx.gbl...
    > We have a simple website set-up with IIS5.0 that uses an Access database.
    > About 2 times per week, the website stops working, and when we go to the
    > home page, the following error displays:
    >
    > --------------------------------------
    > Provider error '80004005'
    >
    > Unspecified error
    >
    > /Default.asp, line 11
    > --------------------------------------
    >
    > Here's the code in default.asp. The error is in the dbConn.Open. In order
    > to fix the problem, I do an IISRESET and the site works again. Does anyone
    > know what could be happening?
    >
    > --------------------------------------
    >
    > Dim dbConn, rs, intCount
    > Set dbConn = Server.CreateObject("ADODB.Connection")
    > dbConn.Open GetConnectString() <==========ERROR OCCURS HERE
    > dbConn.Execute ("UPDATE tblCounter SET Counter = Counter + 1")
    >
    > set rs = dbConn.Execute("SELECT Counter FROM tblCounter",,adCmdText)
    > intCount = rs("Counter")
    >
    > rs.Close set rs = nothing
    >
    >
    >

    Ray at Guest

  2. #2

    Default Re: Provider error?

    Sorry, the function is:

    Function GetConnectString()
    GetConnectString = "Driver={Microsoft Access Driver (*.mdb)};
    Dbq=C:\inetpub\WWWRoot\MyDatabase.Mdb"
    End Function

    The function is in GeneralInclude.asp



    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:uVSYWPvUDHA.1152tk2msftngp13.phx.gbl...
    > What is GetConnectionString? A function? Where is it? What does it say?
    >
    > Ray at work
    >
    > "Dean J. Garrett" <deanj_garrett> wrote in message
    > news:%23R8dSNvUDHA.964TK2MSFTNGP09.phx.gbl...
    > > We have a simple website set-up with IIS5.0 that uses an Access
    database.
    > > About 2 times per week, the website stops working, and when we go to the
    > > home page, the following error displays:
    > >
    > > --------------------------------------
    > > Provider error '80004005'
    > >
    > > Unspecified error
    > >
    > > /Default.asp, line 11
    > > --------------------------------------
    > >
    > > Here's the code in default.asp. The error is in the dbConn.Open. In
    order
    > > to fix the problem, I do an IISRESET and the site works again. Does
    anyone
    > > know what could be happening?
    > >
    > > --------------------------------------
    > >
    > > Dim dbConn, rs, intCount
    > > Set dbConn = Server.CreateObject("ADODB.Connection")
    > > dbConn.Open GetConnectString() <==========ERROR OCCURS HERE
    > > dbConn.Execute ("UPDATE tblCounter SET Counter = Counter + 1")
    > >
    > > set rs = dbConn.Execute("SELECT Counter FROM tblCounter",,adCmdText)
    > > intCount = rs("Counter")
    > >
    > > rs.Close set rs = nothing
    > >
    > >
    > >
    >
    >

    Dean J. Garrett Guest

  3. #3

    Default Re: Provider error?

    IIRC that's a permissions error.

    --
    ----------------------------------------------------------
    Curt Christianson (Software_AT_Darkfalz.Com)
    Owner/Lead Designer, DF-Software
    [url]http://www.Darkfalz.com[/url]
    ---------------------------------------------------------
    ...Offering free scripts & code snippits for everyone...
    ---------------------------------------------------------

    "Dean J. Garrett" <deanj_garrett> wrote in message
    news:uE#vyWwUDHA.2308TK2MSFTNGP12.phx.gbl...
    > Sorry, the function is:
    >
    > Function GetConnectString()
    > GetConnectString = "Driver={Microsoft Access Driver (*.mdb)};
    > Dbq=C:\inetpub\WWWRoot\MyDatabase.Mdb"
    > End Function
    >
    > The function is in GeneralInclude.asp
    >
    >
    >
    > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    > news:uVSYWPvUDHA.1152tk2msftngp13.phx.gbl...
    > > What is GetConnectionString? A function? Where is it? What does it
    say?
    > >
    > > Ray at work
    > >
    > > "Dean J. Garrett" <deanj_garrett> wrote in message
    > > news:%23R8dSNvUDHA.964TK2MSFTNGP09.phx.gbl...
    > > > We have a simple website set-up with IIS5.0 that uses an Access
    > database.
    > > > About 2 times per week, the website stops working, and when we go to
    the
    > > > home page, the following error displays:
    > > >
    > > > --------------------------------------
    > > > Provider error '80004005'
    > > >
    > > > Unspecified error
    > > >
    > > > /Default.asp, line 11
    > > > --------------------------------------
    > > >
    > > > Here's the code in default.asp. The error is in the dbConn.Open. In
    > order
    > > > to fix the problem, I do an IISRESET and the site works again. Does
    > anyone
    > > > know what could be happening?
    > > >
    > > > --------------------------------------
    > > >
    > > > Dim dbConn, rs, intCount
    > > > Set dbConn = Server.CreateObject("ADODB.Connection")
    > > > dbConn.Open GetConnectString() <==========ERROR OCCURS HERE
    > > > dbConn.Execute ("UPDATE tblCounter SET Counter = Counter + 1")
    > > >
    > > > set rs = dbConn.Execute("SELECT Counter FROM tblCounter",,adCmdText)
    > > > intCount = rs("Counter")
    > > >
    > > > rs.Close set rs = nothing
    > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Curt_C [MVP] Guest

  4. #4

    Default Re: Provider error?

    So something is unstable on the server if suddenly the permissions of the
    ..mdb file change and require a reset of IIS?



    "Curt_C [MVP]" <Software_AT_Darkfalz.com> wrote in message
    news:#jxgXgwUDHA.1816TK2MSFTNGP09.phx.gbl...
    > IIRC that's a permissions error.
    >
    > --
    > ----------------------------------------------------------
    > Curt Christianson (Software_AT_Darkfalz.Com)
    > Owner/Lead Designer, DF-Software
    > [url]http://www.Darkfalz.com[/url]
    > ---------------------------------------------------------
    > ..Offering free scripts & code snippits for everyone...
    > ---------------------------------------------------------
    >
    > "Dean J. Garrett" <deanj_garrett> wrote in message
    > news:uE#vyWwUDHA.2308TK2MSFTNGP12.phx.gbl...
    > > Sorry, the function is:
    > >
    > > Function GetConnectString()
    > > GetConnectString = "Driver={Microsoft Access Driver (*.mdb)};
    > > Dbq=C:\inetpub\WWWRoot\MyDatabase.Mdb"
    > > End Function
    > >
    > > The function is in GeneralInclude.asp
    > >
    > >
    > >
    > > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    > > news:uVSYWPvUDHA.1152tk2msftngp13.phx.gbl...
    > > > What is GetConnectionString? A function? Where is it? What does it
    > say?
    > > >
    > > > Ray at work
    > > >
    > > > "Dean J. Garrett" <deanj_garrett> wrote in message
    > > > news:%23R8dSNvUDHA.964TK2MSFTNGP09.phx.gbl...
    > > > > We have a simple website set-up with IIS5.0 that uses an Access
    > > database.
    > > > > About 2 times per week, the website stops working, and when we go to
    > the
    > > > > home page, the following error displays:
    > > > >
    > > > > --------------------------------------
    > > > > Provider error '80004005'
    > > > >
    > > > > Unspecified error
    > > > >
    > > > > /Default.asp, line 11
    > > > > --------------------------------------
    > > > >
    > > > > Here's the code in default.asp. The error is in the dbConn.Open. In
    > > order
    > > > > to fix the problem, I do an IISRESET and the site works again. Does
    > > anyone
    > > > > know what could be happening?
    > > > >
    > > > > --------------------------------------
    > > > >
    > > > > Dim dbConn, rs, intCount
    > > > > Set dbConn = Server.CreateObject("ADODB.Connection")
    > > > > dbConn.Open GetConnectString() <==========ERROR OCCURS HERE
    > > > > dbConn.Execute ("UPDATE tblCounter SET Counter = Counter + 1")
    > > > >
    > > > > set rs = dbConn.Execute("SELECT Counter FROM tblCounter",,adCmdText)
    > > > > intCount = rs("Counter")
    > > > >
    > > > > rs.Close set rs = nothing
    > > > >
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Dean J. Garrett Guest

  5. #5

    Default Re: Provider error?

    Try a different connectstring:


    Provider=Microsoft.Jet.OLEDB.4.0;Data
    Source=C:\inetpub\WWWRoot\MyDatabase.Mdb;Persist Security Info=False


    --
    John Blessing
    [url]http://www.LbeHelpdesk.com[/url] - Help Desk software at affordable prices
    [url]http://www.free-helpdesk.com[/url] - Completely free help desk software !
    [url]http://www.lbetoolbox.com[/url] - Remove Duplicates from MS Outlook
    [url]http://www.lbesync.com[/url] - Synchronize two Outlook Personal Folders
    "Dean J. Garrett" <deanj_garrett> wrote in message
    news:uE%23vyWwUDHA.2308TK2MSFTNGP12.phx.gbl...
    > Sorry, the function is:
    >
    > Function GetConnectString()
    > GetConnectString = "Driver={Microsoft Access Driver (*.mdb)};
    > Dbq=C:\inetpub\WWWRoot\MyDatabase.Mdb"
    > End Function
    >
    > The function is in GeneralInclude.asp
    >
    >
    >
    > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    > news:uVSYWPvUDHA.1152tk2msftngp13.phx.gbl...
    > > What is GetConnectionString? A function? Where is it? What does it
    say?
    > >
    > > Ray at work
    > >
    > > "Dean J. Garrett" <deanj_garrett> wrote in message
    > > news:%23R8dSNvUDHA.964TK2MSFTNGP09.phx.gbl...
    > > > We have a simple website set-up with IIS5.0 that uses an Access
    > database.
    > > > About 2 times per week, the website stops working, and when we go to
    the
    > > > home page, the following error displays:
    > > >
    > > > --------------------------------------
    > > > Provider error '80004005'
    > > >
    > > > Unspecified error
    > > >
    > > > /Default.asp, line 11
    > > > --------------------------------------
    > > >
    > > > Here's the code in default.asp. The error is in the dbConn.Open. In
    > order
    > > > to fix the problem, I do an IISRESET and the site works again. Does
    > anyone
    > > > know what could be happening?
    > > >
    > > > --------------------------------------
    > > >
    > > > Dim dbConn, rs, intCount
    > > > Set dbConn = Server.CreateObject("ADODB.Connection")
    > > > dbConn.Open GetConnectString() <==========ERROR OCCURS HERE
    > > > dbConn.Execute ("UPDATE tblCounter SET Counter = Counter + 1")
    > > >
    > > > set rs = dbConn.Execute("SELECT Counter FROM tblCounter",,adCmdText)
    > > > intCount = rs("Counter")
    > > >
    > > > rs.Close set rs = nothing
    > > >
    > > >
    > > >
    > >
    > >
    >
    >
    John Blessing Guest

  6. #6

    Default Re: Provider error?

    Hello,

    Thank you very much for the suggestion. Very much appreciated. I'll try it.


    "John Blessing" <ntlnews**REMOVETHIS**lbehelpdesk.com> wrote in message
    news:Z8zUa.2406$G85.2176newsfep4-winn.server.ntli.net...
    > Try a different connectstring:
    >
    >
    > Provider=Microsoft.Jet.OLEDB.4.0;Data
    > Source=C:\inetpub\WWWRoot\MyDatabase.Mdb;Persist Security Info=False
    >
    >
    > --
    > John Blessing
    > [url]http://www.LbeHelpdesk.com[/url] - Help Desk software at affordable prices
    > [url]http://www.free-helpdesk.com[/url] - Completely free help desk software !
    > [url]http://www.lbetoolbox.com[/url] - Remove Duplicates from MS Outlook
    > [url]http://www.lbesync.com[/url] - Synchronize two Outlook Personal Folders
    > "Dean J. Garrett" <deanj_garrett> wrote in message
    > news:uE%23vyWwUDHA.2308TK2MSFTNGP12.phx.gbl...
    > > Sorry, the function is:
    > >
    > > Function GetConnectString()
    > > GetConnectString = "Driver={Microsoft Access Driver (*.mdb)};
    > > Dbq=C:\inetpub\WWWRoot\MyDatabase.Mdb"
    > > End Function
    > >
    > > The function is in GeneralInclude.asp
    > >
    > >
    > >
    > > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    > > news:uVSYWPvUDHA.1152tk2msftngp13.phx.gbl...
    > > > What is GetConnectionString? A function? Where is it? What does it
    > say?
    > > >
    > > > Ray at work
    > > >
    > > > "Dean J. Garrett" <deanj_garrett> wrote in message
    > > > news:%23R8dSNvUDHA.964TK2MSFTNGP09.phx.gbl...
    > > > > We have a simple website set-up with IIS5.0 that uses an Access
    > > database.
    > > > > About 2 times per week, the website stops working, and when we go to
    > the
    > > > > home page, the following error displays:
    > > > >
    > > > > --------------------------------------
    > > > > Provider error '80004005'
    > > > >
    > > > > Unspecified error
    > > > >
    > > > > /Default.asp, line 11
    > > > > --------------------------------------
    > > > >
    > > > > Here's the code in default.asp. The error is in the dbConn.Open. In
    > > order
    > > > > to fix the problem, I do an IISRESET and the site works again. Does
    > > anyone
    > > > > know what could be happening?
    > > > >
    > > > > --------------------------------------
    > > > >
    > > > > Dim dbConn, rs, intCount
    > > > > Set dbConn = Server.CreateObject("ADODB.Connection")
    > > > > dbConn.Open GetConnectString() <==========ERROR OCCURS HERE
    > > > > dbConn.Execute ("UPDATE tblCounter SET Counter = Counter + 1")
    > > > >
    > > > > set rs = dbConn.Execute("SELECT Counter FROM tblCounter",,adCmdText)
    > > > > intCount = rs("Counter")
    > > > >
    > > > > rs.Close set rs = nothing
    > > > >
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >

    Dean J. Garrett Guest

  7. #7

    Default Re: Provider error?

    Hello,

    We tried the new connect string on two sites that run an Access database. One of them worked fine with the new connect string, but the other got the following error. Any ideas why?

    HTTP 500.100 - Internal Server Error - ASP error
    Internet Information Services

    --------------------------------------------------------------------------------

    Technical Information (for support personnel)

    a.. Error Type:
    Microsoft JET Database Engine (0x80040E14)
    Syntax error in UPDATE statement.
    /mysite/Default.asp, line 12


    b.. Browser Type:
    Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)

    c.. Page:
    GET /mysite/Default.asp




    "John Blessing" <ntlnews**REMOVETHIS**lbehelpdesk.com> wrote in message news:Z8zUa.2406$G85.2176newsfep4-winn.server.ntli.net...
    > Try a different connectstring:
    >
    >
    > Provider=Microsoft.Jet.OLEDB.4.0;Data
    > Source=C:\inetpub\WWWRoot\MyDatabase.Mdb;Persist Security Info=False
    >
    >

    Dean J. Garrett Guest

  8. #8

    Default Re: Provider error?

    Huh. Are you sure that's what it is? That runs just fine in SQL 200 and
    Access 2002. IIRC, you were not creating a string variable to hold your SQL
    and then passing that to your ado connection to execute it. Try doing that
    so you can be sure that you're getting a correct response.write of your SQL

    Ray at home

    --
    Will trade ASP help for SQL Server help


    "Dean J. Garrett" <deanj_garrett> wrote in message
    news:eK6B7ziVDHA.3232tk2msftngp13.phx.gbl...
    > Ah,
    >
    > UPDATE tblCounter SET Counter = Counter + 1
    >
    > pretty simple ... unless "Counter" is a reserved word now.
    >
    >
    > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    > news:eUc8mYgVDHA.3088tk2msftngp13.phx.gbl...
    > > Response.write YourSQLString
    > > Response.End
    > >
    > > What's the output?
    > >
    > > Ray at work
    > >
    > > "Dean J. Garrett" <deanj_garrett> wrote in an HTML encoded
    > message
    > > news:egszRVgVDHA.1912TK2MSFTNGP11.phx.gbl...
    > > Hello,
    > >
    > > We tried the new connect string on two sites that run an Access
    database.
    > > One of them worked fine with the new connect string, but the other got
    the
    > > following error. Any ideas why?
    > >
    > > HTTP 500.100 - Internal Server Error - ASP error
    > > Internet Information Services
    > >
    > >
    > >
    > > Technical Information (for support personnel)
    > > Error Type:
    > > Microsoft JET Database Engine (0x80040E14)
    > > Syntax error in UPDATE statement.
    > > /mysite/Default.asp, line 12
    > >
    > >
    >
    >

    Ray at Guest

  9. #9

    Default Re: Provider error?

    Sorry, to be exact, here's the code:

    Dim dbConn, rs, intCount

    Set dbConn = Server.CreateObject("ADODB.Connection")
    'the function below simply gets the connect string suggested
    dbConn.Open GetConnectString()
    dbConn.Execute ("UPDATE tblCounter SET Counter = Counter + 1")

    set rs = dbConn.Execute("SELECT Counter FROM tblCounter",,adCmdText)
    intCount = rs("Counter")

    rs.Close
    set rs = nothing
    set dbConn = nothing


    Thank you...


    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:#hu#kFjVDHA.572TK2MSFTNGP11.phx.gbl...
    > Huh. Are you sure that's what it is? That runs just fine in SQL 200 and
    > Access 2002. IIRC, you were not creating a string variable to hold your
    SQL
    > and then passing that to your ado connection to execute it. Try doing
    that
    > so you can be sure that you're getting a correct response.write of your
    SQL
    >
    > Ray at home
    >
    > --
    > Will trade ASP help for SQL Server help
    >
    >
    > "Dean J. Garrett" <deanj_garrett> wrote in message
    > news:eK6B7ziVDHA.3232tk2msftngp13.phx.gbl...
    > > Ah,
    > >
    > > UPDATE tblCounter SET Counter = Counter + 1
    > >
    > > pretty simple ... unless "Counter" is a reserved word now.
    > >
    > >
    > > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    > > news:eUc8mYgVDHA.3088tk2msftngp13.phx.gbl...
    > > > Response.write YourSQLString
    > > > Response.End
    > > >
    > > > What's the output?
    > > >
    > > > Ray at work
    > > >
    > > > "Dean J. Garrett" <deanj_garrett> wrote in an HTML encoded
    > > message
    > > > news:egszRVgVDHA.1912TK2MSFTNGP11.phx.gbl...
    > > > Hello,
    > > >
    > > > We tried the new connect string on two sites that run an Access
    > database.
    > > > One of them worked fine with the new connect string, but the other got
    > the
    > > > following error. Any ideas why?
    > > >
    > > > HTTP 500.100 - Internal Server Error - ASP error
    > > > Internet Information Services
    > > >
    > > >
    > > >
    > > > Technical Information (for support personnel)
    > > > Error Type:
    > > > Microsoft JET Database Engine (0x80040E14)
    > > > Syntax error in UPDATE statement.
    > > > /mysite/Default.asp, line 12
    > > >
    > > >
    > >
    > >
    >
    >

    Dean J. Garrett Guest

  10. #10

    Default Re: Provider error?

    Arg. Put [] around counter and I believe it'll work. I executed this in
    Access's query window and it was fine, but when running it in a vbs file, it
    wanted the [] around counter. I should have thought of this earlier; plus,
    you mentioned it. Here's my test .vbs file that ran fine WITH the [] only.

    Set dbConn = CreateObject("ADODB.Connection")
    dbConn.OPen "Provider=Microsoft.Jet.OLEDB.4.0;Data
    Source=C:\test.Mdb;Persist Security Info=False"
    dbConn.Execute "UPDATE tblCounter SET [Counter] = [Counter] + 1"
    dbConn.Close
    Set dbConn = Nothing

    Ray at home
    --
    Will trade ASP help for SQL Server help


    "Dean J. Garrett" <deanj_garrett> wrote in message
    news:Olq8fkjVDHA.3220tk2msftngp13.phx.gbl...
    > Sorry, to be exact, here's the code:
    >
    > Dim dbConn, rs, intCount
    >
    > Set dbConn = Server.CreateObject("ADODB.Connection")
    > 'the function below simply gets the connect string suggested
    > dbConn.Open GetConnectString()
    > dbConn.Execute ("UPDATE tblCounter SET Counter = Counter + 1")
    >
    > set rs = dbConn.Execute("SELECT Counter FROM tblCounter",,adCmdText)
    > intCount = rs("Counter")
    >
    > rs.Close
    > set rs = nothing
    > set dbConn = nothing
    >
    >
    > Thank you...
    >
    >
    > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    > news:#hu#kFjVDHA.572TK2MSFTNGP11.phx.gbl...
    > > Huh. Are you sure that's what it is? That runs just fine in SQL 200
    and
    > > Access 2002. IIRC, you were not creating a string variable to hold your
    > SQL
    > > and then passing that to your ado connection to execute it. Try doing
    > that
    > > so you can be sure that you're getting a correct response.write of your
    > SQL
    > >
    > > Ray at home
    > >
    > > --
    > > Will trade ASP help for SQL Server help
    > >
    > >
    > > "Dean J. Garrett" <deanj_garrett> wrote in message
    > > news:eK6B7ziVDHA.3232tk2msftngp13.phx.gbl...
    > > > Ah,
    > > >
    > > > UPDATE tblCounter SET Counter = Counter + 1
    > > >
    > > > pretty simple ... unless "Counter" is a reserved word now.
    > > >
    > > >
    > > > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in
    message
    > > > news:eUc8mYgVDHA.3088tk2msftngp13.phx.gbl...
    > > > > Response.write YourSQLString
    > > > > Response.End
    > > > >
    > > > > What's the output?
    > > > >
    > > > > Ray at work
    > > > >
    > > > > "Dean J. Garrett" <deanj_garrett> wrote in an HTML encoded
    > > > message
    > > > > news:egszRVgVDHA.1912TK2MSFTNGP11.phx.gbl...
    > > > > Hello,
    > > > >
    > > > > We tried the new connect string on two sites that run an Access
    > > database.
    > > > > One of them worked fine with the new connect string, but the other
    got
    > > the
    > > > > following error. Any ideas why?
    > > > >
    > > > > HTTP 500.100 - Internal Server Error - ASP error
    > > > > Internet Information Services
    > > > >
    > > > >
    > > > >
    > > > > Technical Information (for support personnel)
    > > > > Error Type:
    > > > > Microsoft JET Database Engine (0x80040E14)
    > > > > Syntax error in UPDATE statement.
    > > > > /mysite/Default.asp, line 12
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Ray at Guest

  11. #11

    Default Re: Provider error?

    Hi again,

    This worked great. So the moral of this story is that the OLE DB provider
    recognizes slightly different syntax in SQL than the Jet ODBC driver used
    within access. I wish MS would publish these differences somewhere. Or may
    be the trick is to always enclose fieldnames inside of brackets when
    accessing an .MDB from ASP.

    Thank you!


    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:egVyHqjVDHA.1948TK2MSFTNGP11.phx.gbl...
    > Arg. Put [] around counter and I believe it'll work. I executed this in
    > Access's query window and it was fine, but when running it in a vbs file,
    it
    > wanted the [] around counter. I should have thought of this earlier;
    plus,
    > you mentioned it. Here's my test .vbs file that ran fine WITH the []
    only.
    >
    > Set dbConn = CreateObject("ADODB.Connection")
    > dbConn.OPen "Provider=Microsoft.Jet.OLEDB.4.0;Data
    > Source=C:\test.Mdb;Persist Security Info=False"
    > dbConn.Execute "UPDATE tblCounter SET [Counter] = [Counter] + 1"
    > dbConn.Close
    > Set dbConn = Nothing
    >
    > Ray at home
    > --
    > Will trade ASP help for SQL Server help
    >
    >
    > "Dean J. Garrett" <deanj_garrett> wrote in message
    > news:Olq8fkjVDHA.3220tk2msftngp13.phx.gbl...
    > > Sorry, to be exact, here's the code:
    > >
    > > Dim dbConn, rs, intCount
    > >
    > > Set dbConn = Server.CreateObject("ADODB.Connection")
    > > 'the function below simply gets the connect string suggested
    > > dbConn.Open GetConnectString()
    > > dbConn.Execute ("UPDATE tblCounter SET Counter = Counter + 1")
    > >
    > > set rs = dbConn.Execute("SELECT Counter FROM tblCounter",,adCmdText)
    > > intCount = rs("Counter")
    > >
    > > rs.Close
    > > set rs = nothing
    > > set dbConn = nothing
    > >
    > >
    > > Thank you...
    > >
    > >
    > > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    > > news:#hu#kFjVDHA.572TK2MSFTNGP11.phx.gbl...
    > > > Huh. Are you sure that's what it is? That runs just fine in SQL 200
    > and
    > > > Access 2002. IIRC, you were not creating a string variable to hold
    your
    > > SQL
    > > > and then passing that to your ado connection to execute it. Try doing
    > > that
    > > > so you can be sure that you're getting a correct response.write of
    your
    > > SQL
    > > >
    > > > Ray at home
    > > >
    > > > --
    > > > Will trade ASP help for SQL Server help
    > > >
    > > >
    > > > "Dean J. Garrett" <deanj_garrett> wrote in message
    > > > news:eK6B7ziVDHA.3232tk2msftngp13.phx.gbl...
    > > > > Ah,
    > > > >
    > > > > UPDATE tblCounter SET Counter = Counter + 1
    > > > >
    > > > > pretty simple ... unless "Counter" is a reserved word now.
    > > > >
    > > > >
    > > > > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in
    > message
    > > > > news:eUc8mYgVDHA.3088tk2msftngp13.phx.gbl...
    > > > > > Response.write YourSQLString
    > > > > > Response.End
    > > > > >
    > > > > > What's the output?
    > > > > >
    > > > > > Ray at work
    > > > > >
    > > > > > "Dean J. Garrett" <deanj_garrett> wrote in an HTML
    encoded
    > > > > message
    > > > > > news:egszRVgVDHA.1912TK2MSFTNGP11.phx.gbl...
    > > > > > Hello,
    > > > > >
    > > > > > We tried the new connect string on two sites that run an Access
    > > > database.
    > > > > > One of them worked fine with the new connect string, but the other
    > got
    > > > the
    > > > > > following error. Any ideas why?
    > > > > >
    > > > > > HTTP 500.100 - Internal Server Error - ASP error
    > > > > > Internet Information Services
    > > > > >
    > > > > >
    > > > > >
    > > > > > Technical Information (for support personnel)
    > > > > > Error Type:
    > > > > > Microsoft JET Database Engine (0x80040E14)
    > > > > > Syntax error in UPDATE statement.
    > > > > > /mysite/Default.asp, line 12
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Dean J. Garrett Guest

Similar Threads

  1. refresh causes Provider error '80004005'
    By MS Newsgroups in forum ASP Database
    Replies: 1
    Last Post: February 19th, 11:52 PM
  2. Provider cannot be found error
    By Peak in forum ASP Database
    Replies: 3
    Last Post: December 27th, 12:26 PM
  3. Replies: 4
    Last Post: October 22nd, 10:02 AM
  4. Provider error '8007000e' - Not enough storage ...
    By Claudio Ledermann in forum ASP
    Replies: 7
    Last Post: August 22nd, 07:19 PM
  5. Replies: 2
    Last Post: July 1st, 02:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139