•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 456,509 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,661 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 1018 | Replies: 3
![]() |
Hello there, guys!
I'll get right to it. I am coding in VB, using Visual Studio 2005, and I need to retrieve the data from a MS Access database. The thing is, I need to use a SQL statement to do so, right? Therefore, I need to know the number and names of the tables, right? Well, that isn't much of a generic application there, is it...
So, I wanted to ask, is there any way to load the data from the database, without knowing the beforementioned information??? I know it may be a better question under the SQL section, but... be patient...
thanks in advance! Gotta geto to work!
I'll get right to it. I am coding in VB, using Visual Studio 2005, and I need to retrieve the data from a MS Access database. The thing is, I need to use a SQL statement to do so, right? Therefore, I need to know the number and names of the tables, right? Well, that isn't much of a generic application there, is it...
So, I wanted to ask, is there any way to load the data from the database, without knowing the beforementioned information??? I know it may be a better question under the SQL section, but... be patient...
thanks in advance! Gotta geto to work!
Knowledge is something one can acquire. Will... well, that's another story!
•
•
Join Date: Sep 2007
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
you can use adodc component to access the data base from the MS Access without using SQL
just goto to the project menu click components or press ctrl + t and tick the microsoft adodc data control 6.0 and drag it to the form then right click on the adodc then adodc properties in the open window choose use connection string then click the Build button next it and in the open window select microsoft ole db 4.0 provider then click Next button now select the ms access database file from which you want to retreive data then click test button REST I WILL TELL WHEN YOU MAIL ME AT neerajraja2001@yahoo.co.in
just goto to the project menu click components or press ctrl + t and tick the microsoft adodc data control 6.0 and drag it to the form then right click on the adodc then adodc properties in the open window choose use connection string then click the Build button next it and in the open window select microsoft ole db 4.0 provider then click Next button now select the ms access database file from which you want to retreive data then click test button REST I WILL TELL WHEN YOU MAIL ME AT neerajraja2001@yahoo.co.in
Yes, thank you, but I already know that. The problem is, in that way I connect to a single database, and I may use only that precise database. What I want to do, instead, is providing the user with the option to connect to a different database every time he uses the program. That is what I mean when I say "generic application".
So, the thing would be, determining the count of the tables in the database, plus the name of every table. I have come up with a solution, which is prompting the user to insert the names of the tables in a text file, which I then use to retrieve the data. I know, it would be the same putting them in a text box in the application window. That way, it is actually possible to include only the desired data, instead of being constrained to load all the data present in the database. So, there is a pro to this method.
The downside is that the user must insert the table names manually... Imagine you have a HUGE database, and you get the meaning... But that's what I've come up with up until now.
So, any help is welcome! Although I really don't think there is a way to retrieve tha data without knowing tha table names. Then again, how does Visual Studio do it??? So, there must be a way!!! Help me sort it out, please!!!
- Shadowhawk
So, the thing would be, determining the count of the tables in the database, plus the name of every table. I have come up with a solution, which is prompting the user to insert the names of the tables in a text file, which I then use to retrieve the data. I know, it would be the same putting them in a text box in the application window. That way, it is actually possible to include only the desired data, instead of being constrained to load all the data present in the database. So, there is a pro to this method.
The downside is that the user must insert the table names manually... Imagine you have a HUGE database, and you get the meaning... But that's what I've come up with up until now.
So, any help is welcome! Although I really don't think there is a way to retrieve tha data without knowing tha table names. Then again, how does Visual Studio do it??? So, there must be a way!!! Help me sort it out, please!!!
- Shadowhawk
Last edited by Shadowhawk : Sep 28th, 2007 at 8:38 am.
Knowledge is something one can acquire. Will... well, that's another story!
•
•
Join Date: Jul 2007
Location: Philippines
Posts: 253
Reputation:
Rep Power: 0
Solved Threads: 28
I think I'vre already seen that problem, please browse that here: http://www.martin2k.co.uk/forums/index.php?showforum=4
![]() |
•
•
•
•
•
•
•
•
DaniWeb Visual Basic 4 / 5 / 6 Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- any1 knw how 2 connect access data to dW cs3 (Database Design)
- time to time data updates,to access that data time to time (MySQL)
- How can i access data from MS Access using VB6 (I need the connection code) (Visual Basic 4 / 5 / 6)
- VB6 and MS Access Problem (Visual Basic 4 / 5 / 6)
- Vb.net source code to access data from Access Database (Visual Basic 4 / 5 / 6)
- how to access data using pointers... (C++)
- cant access data on maxtor drive (Storage)
- I have heard about Access Data Project .Can anybody tell me what is it and when it is (MS Access and FileMaker Pro)
- AnsiString Template Data Return Problem Builder 6 (C++)
- Program Problem with a select statement to access Data base (C)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: calender help need
- Next Thread: Joining two tables in VB 6


Linear Mode