Jump to content
Sign in to follow this  
LOULOU

DSNLESS AND DB DATABASE

Recommended Posts

LOULOU

Who can help me to open a dsnless database and after querying with com object I don't arrive

Thanks

Share this post


Link to post
Share on other sites
BigDaddyO

What type of database are you trying to open?

SQL

MYSQL

Access

???


Share this post


Link to post
Share on other sites
sykes

The following is an example of connecting and communicating with an access database:

$adoCon = ObjCreate("ADODB.Connection")
$adoCon.Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=test.mdb;")
$adoRS = ObjCreate("ADODB.Recordset")
$adoRS.CursorType = 2
$adoRS.LockType = 3
$adoRS.Open("SELECT * FROM tblData", $adoCon)
$adoRS.AddNew
$adoRS.Fields("fldData").Value = 'your value here'
$adoRS.Fields("fldInfo").Value = 'your value here'
$adoRS.Update
$adoRS.Close
$adoCon.Close

It writes data to 'fldData' and fldInfo' in the table 'tblData'

You can find tons of examples of this type by just searching the forum :P

***Note this uses the latest beta***


We have enough youth. How about a fountain of SMART?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.