473,396 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Loop All Database In Server

Hi all,
I was wondering how can I loop through all the database in a
particular server using ADODB into a combobox? Below is the code I
tried using but didnt work, any hints/solutions for this anyone??

Thanks,
Henry
Dim Cnxn As ADODB.Connection
Dim rstSchema As ADODB.Recordset
Dim strCnxn As String

Cnxn = New ADODB.Connection

'Sybase ASE ODBC Driver Connection string - uses DSN
'strCnxn = "DSN=ase4141;UID=" & ;PWD=;"
strCnxn = "DSN=" & Me.cbxDataSource.Text & ";UID=" &
Me.tbxLogin.Text & ";PWD=" & Me.tbxPassword.Text

Cnxn.Open(strCnxn)

rstSchema = Cnxn.OpenSchema(ADODB.SchemaEnum.adSchemaSchemata)

Do Until rstSchema.EOF
Debug.WriteLine(rstSchema)
rstSchema.MoveNext()
Loop

' clean up
rstSchema.Close()
Cnxn.Close()
rstSchema = Nothing
Cnxn = Nothing
Nov 21 '05 #1
1 1102
Hi,

Maybe this will help.

http://www.informit.com/articles/art...=27199&redir=1

Ken
----------------
"Henry C. Wu" <he***********@gmail.com> wrote in message
news:44**************************@posting.google.c om...
Hi all,
I was wondering how can I loop through all the database in a
particular server using ADODB into a combobox? Below is the code I
tried using but didnt work, any hints/solutions for this anyone??

Thanks,
Henry
Dim Cnxn As ADODB.Connection
Dim rstSchema As ADODB.Recordset
Dim strCnxn As String

Cnxn = New ADODB.Connection

'Sybase ASE ODBC Driver Connection string - uses DSN
'strCnxn = "DSN=ase4141;UID=" & ;PWD=;"
strCnxn = "DSN=" & Me.cbxDataSource.Text & ";UID=" &
Me.tbxLogin.Text & ";PWD=" & Me.tbxPassword.Text

Cnxn.Open(strCnxn)

rstSchema = Cnxn.OpenSchema(ADODB.SchemaEnum.adSchemaSchemata)

Do Until rstSchema.EOF
Debug.WriteLine(rstSchema)
rstSchema.MoveNext()
Loop

' clean up
rstSchema.Close()
Cnxn.Close()
rstSchema = Nothing
Cnxn = Nothing
Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Kingdom | last post by:
I Need some serious help here. strugling novis with ASP and javascript any help would be greatly appreciated The script below does exactly what I want it to do for each product on the two passes...
2
by: John Smith | last post by:
I'm trying to perform a loop to display the contents of my DB, the only issue is that I would only like to display 10 results maximum this is relatively easy but what happens if there are less than...
2
by: Les Juby | last post by:
I have an application which loops through several thousand subscriber records, compares each subscriber's requirements to a database of businesses for sale, and then prepares and mails off an email...
6
by: ALthePal | last post by:
Hi, I'm not sure if we are able to or even how to loop through the web forms in a VB.NET project during design time. In MSAccess we are able to go through the database -> forms collection and...
1
by: jlee | last post by:
I'm pretty much a newbie on mysql, and I need some help. I am running mysql Ver 12.22 Distrib 4.0.24, for portbld-freebsd5.4 (i386) on a server hosting an active website. The site's developer...
2
by: satishchandra999 | last post by:
I have SP, which has a cursor iterations. Need to call another SP for every loop iteration of the cursor. The pseudo code is as follows.. Create proc1 as Begin Variable declrations... ...
52
by: MP | last post by:
Hi trying to begin to learn database using vb6, ado/adox, mdb format, sql (not using access...just mdb format via ado) i need to group the values of multiple fields - get their possible...
3
by: =?Utf-8?B?VmFuZXNzYQ==?= | last post by:
Here is my loop and it runs fine: ---------------------------------------------------- sSQL = "SELECT * FROM STORE_ITEMS" Set DataRec = DB.execute(sSQL) if not DataRec.EOF then do while not...
2
by: fniles | last post by:
I am using .Net 2003 and querying a SQL Server 2000 database. I read the database in a loop, but on every iteration I set the SQLCommand to new, set it, execute it, dispose and set it to nothing....
2
by: fran7 | last post by:
Hi, I know this is simple thing but always beats me. I have this script that works fine, I just want to add a loop so that it returns all the entries instead of just one. <% ' ADO Constant....
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.