View Single Post
Old 07-30-2017, 03:46 PM
VB_Alien VB_Alien is offline
Senior Contributor
Join Date: Apr 2004
Posts: 854
Default Data adapter blues

I am trying to make my database program load different
databases but i get stalled at the data adapter but i think
the trouble is really with my sql command line.

My sql command line at first was hard coded
because i knew what my table name was in my
database and i was only working with the one
database and one table.

I decided to fix my program so that i can open
any access database but without knowing what the
table name would be, it throws an error, something
about my (FROM) clause being wrong and its right.

My sql command looks like this
SELECT * FROM [Movies]

This was used for the first database to get to working.
The problem is that my data adapter is looking at my
sql command line and saying, Hold on there. Movies
isnt a table in this new database that you are trying to

I was wondering if there is a sql command that will
tell the adapter to open the first table in the database
without the programmer having to hard code the table
name everytime a new database is loaded.
Reply With Quote