User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: Jun 2005
Location: Italy
Posts: 12
Reputation: Shadowhawk is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
Shadowhawk's Avatar
Shadowhawk Shadowhawk is offline Offline
Newbie Poster

MS Access data retrieval problem

  #1  
Sep 27th, 2007
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!
Knowledge is something one can acquire. Will... well, that's another story!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2007
Posts: 4
Reputation: Neeraj Sharma is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Neeraj Sharma Neeraj Sharma is offline Offline
Newbie Poster

Re: MS Access data retrieval problem

  #2  
Sep 27th, 2007
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
Reply With Quote  
Join Date: Jun 2005
Location: Italy
Posts: 12
Reputation: Shadowhawk is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
Shadowhawk's Avatar
Shadowhawk Shadowhawk is offline Offline
Newbie Poster

Re: MS Access data retrieval problem

  #3  
Sep 28th, 2007
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
Last edited by Shadowhawk : Sep 28th, 2007 at 8:38 am.
Knowledge is something one can acquire. Will... well, that's another story!
Reply With Quote  
Join Date: Jul 2007
Location: Philippines
Posts: 253
Reputation: jireh is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 28
jireh's Avatar
jireh jireh is offline Offline
Posting Whiz in Training

Re: MS Access data retrieval problem

  #4  
Sep 28th, 2007
I think I'vre already seen that problem, please browse that here: http://www.martin2k.co.uk/forums/index.php?showforum=4
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 3:48 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC