im new to vb,
i need to use vb6 to connect to local sql server with
the local system account and get all the databases.
ill be very thanksfull for any help.

i get some project and i have problem on it.i just can connect and view the table in sql server

You can only get the databases that you have access and permissions to. If the local system account does not have the permissions you cannot view the tables.


What is your connection string techz_boy? What error is it giving you?

*Using ADO*

.Connect with

Provider=SQLOLEDB;
Data Source=<your domain>;
Integrated Security=SSPI;
Initial Catalog=master;
Persist Security Info=False

And then .Execute

EXEC sp_databases

That will return every DB you had access in the column 'DATABASE_NAME'


Hope this helps. ;)

yeah i can connect it. but i don't know how to navigate it, select it, or query the table

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.