Hello to all Masters,
I have a problime in the database programming. i am using a Access DATABASE file in the VB6.0 Project. in this project i am creating a veriable such as " Dim s as new ABODB.Connection. but when i run the project it create an ERROR at This Statment." Dim s as new ABODB.Connection "
How i create a ADODB variable that is spourted by the Compiler.

Tell me any one about it.
Please please please.
Dim s As ADODB.Connection
....
Set s = New ADODB.Connection
...

Try this

Dim s as ADODB.CONNECTION

SET s AS NEW ADODB.CONNECTION
s.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb;Persist Security Info=False"
s.open
don't forget the recordset property and its method after this


let me know how u do make out

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.