Microsoft JET Database Engine

I'm using an activeX component to be working with asp.
in the asp, i have a form that inputs users particulars.
I pass the informations to the ocx variables, and in the ocx itself i connect to microsoft access database and using sql insert statement to store the information.
when inserting, i receive this error:

Error Type:
Microsoft JET Database Engine (0x80004005)
Could not find installable ISAM.

i use connection string:

cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data" & _
" DSN=myDB;"

How do i fix this?
[577 byte] By [Wi2] at [2007-11-18 2:14:49]
# 1 Re: Microsoft JET Database Engine
You need to provide a data source

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=mybd;Persist Security Info=False
Boumxyz2 at 2007-11-10 0:02:37 >
# 2 Re: Microsoft JET Database Engine
Thanx..
How about using DSN?
what's the string to use?
Wi2 at 2007-11-10 0:03:37 >
# 3 Re: Microsoft JET Database Engine
if i use the connection string that u mention.. the erorr becomes:
Error Type:
Microsoft JET Database Engine (0x80004005)
Could not find file 'E:\WINNT\system32\mybd'.

i tried putting the db file in the system32..
but the samething happens
Wi2 at 2007-11-10 0:04:32 >
# 4 Re: Microsoft JET Database Engine
DSNs are fine as long as they are defined on each machine and under the proper scope ... I'm doing ADO in Access 2000 and all I specify is my DSN ... Example:

Set MyConnect = New ADODB.Connection

MyConnect.Open "DSN=Billing System;"

If you use a DSN then do not put any provider info in your connection string ... That provider info is set up at the ODBC Sources when you create the DSN. I did this also under VC++. The only thing you will have to provide is login info if it is setup (like a database password, etc ...)

- Mike
M Owen at 2007-11-10 0:05:37 >
# 5 Re: Microsoft JET Database Engine
Hei thanks a lot.

one more thing i'd like to ask..
i am quite sure i have the correct insert into sql syntax..

strSQL = "insert into User(ID,First_Name) VALUES('anid','aname')"

when i execute the sql, why do i get
Syntax error in INSERT INTO statement.
Wi2 at 2007-11-10 0:06:35 >
# 6 Re: Microsoft JET Database Engine
Well your query looks correct ... I would try to check for SQL reserved words 1st ... Like User or ID ... The only other possibility would be a type mismatch on the vlues you're trying to insert.

- Mike
M Owen at 2007-11-10 0:07:34 >
# 7 Re: Microsoft JET Database Engine
I think so Mike is write there might be type mismatch. If ID is an numeric data type then it will not allow the insert. If in case ID is char type then it should allow as I dont think so ID is reserved word.

If in case ID is reserved word you can use [ID] instead
rubyash at 2007-11-10 0:08:43 >
# 8 Re: Microsoft JET Database Engine
Is your id field a number ? if so don't put the " ' " characters

strSQL = "insert into User(ID,First_Name) VALUES(0,'aname')"
Boumxyz2 at 2007-11-10 0:09:35 >
# 9 Re: Microsoft JET Database Engine
Yes, the problem is in reserved sql word. the word "User" is reserved.

i found out from this site (thought it might be useful for all):
http://www.webthang.co.uk/tutorials/mark_rwords/mark_rwords.htm

Now it's running as expected.

Thank you all.
Wi2 at 2007-11-10 0:10:44 >