Click to See Complete Forum and Search --> : Urgent :connecting to database without DAO object.


guptakvn
September 4th, 2001, 07:41 AM
Dear,
I am not using any DAO objects for my application. I have included the DAO references for my project. i am creating a database object.

dim db as database
dim rs as recordset
private sub form_load()
set db = opendatabase(path,false,false)
set rs = db.openrecordset("table",options)
end sub




This code works fine if my database is not set a password. But if it is set a password it says odbc call failed. I have used workspace too.
can some one give me a solution along with an example.
Thank You

berta
September 4th, 2001, 07:57 AM
using ADO


dim cn as new adodb.connection
dim rs as new adodb.recordset

cn.userlocation=aduseclient
cn.open "Provider=Microsoft.Jet.OLEDB.4.0;Password=mypwd;Data Source=mydb.mdb;Persist Security Info=true"

rs.open "table",cn,,,adtable

'... ecc...







[/vbcode]

<center>
<HR width=80%>
<img src='http://web.tiscali.it/bertaplanet/images/bertaplanet.gif'>
</center>

guptakvn
September 4th, 2001, 08:27 AM
dear berta,
i am not using ados too..

berta
September 4th, 2001, 06:16 PM
i'm sorry... but the subject of your mail is "connecting to database without DAO object."

<center>
<HR width=80%>
<img src='http://web.tiscali.it/bertaplanet/images/bertaplanet.gif'>
</center>