|
-
Nov 3rd, 2004, 06:34 AM
#1
Thread Starter
Addicted Member
'.jet' and ASP
Is it possible to open a .jet database in ASP? If so how i have searched the web for information on opening a '.jet' database and all i am getting is errors when opening a '.mdb'.
Thanks in advance
-
Nov 3rd, 2004, 06:42 AM
#2
Post your code that you are using...
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Nov 3rd, 2004, 06:59 AM
#3
Thread Starter
Addicted Member
No code...
There is no code as yet just a database file called 'advertiser.jet' and i am wnting to open the '.jet' file with ASP
-
Nov 3rd, 2004, 10:13 AM
#4
.jet file extension um is there an actual filetype of that? Is it an mdb mascarading as .jet?
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Nov 4th, 2004, 07:37 AM
#5
Thread Starter
Addicted Member
okay it is an access mdb but the application that uses it requires that it has a .jet extension i have mastered the opening of the database connection in ASP but for some reason it will only bring back results from a table and not a query.
My code is as follows:
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:\inetpub\wwwroot\doors\fpdb\advertiser.jet"
set rs=Server.CreateObject("ADODB.recordset")
rs.Open "Select * from Users", conn
rs.movefirst
do while rs.eof=false
response.write rs("Surname")
rs.movenext
loop
rs.close
conn.close
%
names is the name of my access query. As i said before it has now problems if i select * form a table in the database but it will not work with a query. The error we get is:
Error Type:
(0x80004005)
Unspecified error
Your help is greatly appreciated as i am pulling my hair out on this one!!! : (
-
Nov 4th, 2004, 09:49 AM
#6
Firstly add ,3,3,1 to the rst.open "sql statement", conn
VB Code:
rs.Open "Select * from [Users]", conn, 3, 3, 1 'This is read only (static)
Then remark out the rest of the code:
VB Code:
'rs.movefirst
'do while rs.eof=false
'response.write rs("Surname")
'rs.movenext
'loop
rs.close
conn.close
If there is no errors now, then it has to be that you are trying to move to the first record but for some reason there are no records returned.
VB Code:
if rst.eof then
response.write("No records - sorry")
else
rs.movefirst
do while rs.eof=false
response.write rs("Surname")
rs.movenext
loop
end if
Also add square brackets around your field and table names, just incase they happen to be special functions.
Vince
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|