This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > FrontPage Programming > March 2007 > ASP does not find the data
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
ASP does not find the data
|
|
| Amateur 2007-03-08, 6:15 pm |
| Dear Sirs
Accessing my ASP I get the following error message:
ADODB.Recordset.1 error '80004005'
SQLState: S1000
Native Error Code: -1811
[INTERSOLV][ODBC SequeLink driver][ACCESS][Microsoft][ODBC Microsoft Access
Driver] Could not find file
'C:\WINNT\system32\webopenoptionorders430010009000 .mdb'.
/BIE/BIEmotor/43001000-8001/43001000-9000/optionopenorders4300100090001.asp,
line 98
It says that my database is in: Could not find file
'C:\WINNT\system32\webopenoptionorders430010009000 .mdb'.
BUT my database is on an external server with my ISP:
"DSN=access;Database=f:\www.bellfield-barna.com\Data\transferdb.mdb;" the
table name is: webopenoptionorders430010009000
Can someone help me in terms of checking a part of my code and telling me
what I did wrong?
Here is the code:
<!-- #include file="adovbs.inc" -->
<%
' BEGIN USER CONSTANTS
Dim CONN_STRING
' I'm using a DSN-less connection.
' To use a DSN, the format is shown on the next line:
'CONN_STRING =
"DSN=access;Database=f:\www.bellfield-barna.com\Data\transferdb.mdb;"
CONN_STRING = "DBQ=" & Server.MapPath("webopenoptionorders430010009000") & ";"
CONN_STRING = CONN_STRING & "Driver={Microsoft Access Driver (*.mdb)};"
' Our SQL code - overriding values we just set
' Comment out to use Access
CONN_STRING =
"DSN=access;Database=f:\www.bellfield-barna.com\Data\transferdb.mdb;"
' END USER CONSTANTS
' BEGIN RUNTIME CODE
' Declare our vars
Dim iPageSize 'How big our pages are
Dim iPageCount 'The number of pages we get back
Dim iPageCurrent 'The page we want to show
Dim strOrderBy 'A fake parameter used to illustrate passing them
Dim strSQL 'SQL command to execute
Dim objPagingConn 'The ADODB connection object
Dim objPagingRS 'The ADODB recordset object
Dim iRecordsShown 'Loop controller for displaying just iPageSize records
Dim I 'Standard looping var
iPageSize = 10 ' You could easily allow users to change this
If Request.QueryString("page") = "" Then
iPageCurrent = 1
Else
iPageCurrent = CInt(Request.QueryString("page"))
End If
'strSQL = "SELECT * FROM webopenoptionorders430010009000 ORDER BY tradeid;"
| |
| Thomas A. Rowe 2007-03-08, 6:15 pm |
| The Access database must be on the same server as the web site and you would use a physical path to
it, not a URL.
--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
http://www.Ecom-Data.com
==============================================
"Amateur" <Amateur@discussions.microsoft.com> wrote in message
news:162638AD-9167-495A-B02F-BEEBD207D1ED@microsoft.com...
> Dear Sirs
> Accessing my ASP I get the following error message:
>
>
> ADODB.Recordset.1 error '80004005'
>
> SQLState: S1000
> Native Error Code: -1811
> [INTERSOLV][ODBC SequeLink driver][ACCESS][Microsoft][ODBC Microsoft Access
> Driver] Could not find file
> 'C:\WINNT\system32\webopenoptionorders430010009000 .mdb'.
>
> /BIE/BIEmotor/43001000-8001/43001000-9000/optionopenorders4300100090001.asp,
> line 98
>
> It says that my database is in: Could not find file
> 'C:\WINNT\system32\webopenoptionorders430010009000 .mdb'.
>
> BUT my database is on an external server with my ISP:
> "DSN=access;Database=f:\www.bellfield-barna.com\Data\transferdb.mdb;" the
> table name is: webopenoptionorders430010009000
>
> Can someone help me in terms of checking a part of my code and telling me
> what I did wrong?
>
> Here is the code:
>
> <!-- #include file="adovbs.inc" -->
> <%
> ' BEGIN USER CONSTANTS
> Dim CONN_STRING
>
> ' I'm using a DSN-less connection.
> ' To use a DSN, the format is shown on the next line:
> 'CONN_STRING =
> "DSN=access;Database=f:\www.bellfield-barna.com\Data\transferdb.mdb;"
>
> CONN_STRING = "DBQ=" & Server.MapPath("webopenoptionorders430010009000") & ";"
> CONN_STRING = CONN_STRING & "Driver={Microsoft Access Driver (*.mdb)};"
>
> ' Our SQL code - overriding values we just set
> ' Comment out to use Access
> CONN_STRING =
> "DSN=access;Database=f:\www.bellfield-barna.com\Data\transferdb.mdb;"
> ' END USER CONSTANTS
>
>
> ' BEGIN RUNTIME CODE
> ' Declare our vars
> Dim iPageSize 'How big our pages are
> Dim iPageCount 'The number of pages we get back
> Dim iPageCurrent 'The page we want to show
> Dim strOrderBy 'A fake parameter used to illustrate passing them
> Dim strSQL 'SQL command to execute
> Dim objPagingConn 'The ADODB connection object
> Dim objPagingRS 'The ADODB recordset object
> Dim iRecordsShown 'Loop controller for displaying just iPageSize records
> Dim I 'Standard looping var
>
>
> iPageSize = 10 ' You could easily allow users to change this
>
>
> If Request.QueryString("page") = "" Then
> iPageCurrent = 1
> Else
> iPageCurrent = CInt(Request.QueryString("page"))
> End If
>
> 'strSQL = "SELECT * FROM webopenoptionorders430010009000 ORDER BY tradeid;"
>
>
>
>
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|