Re: I dont know how to link VB to database (ODBC) table.




"Howk013" <Howk013@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6CE69FE3-7BC3-47BF-AD79-6FB1E97DEA61@xxxxxxxxxxxxxxxx
Hi

This is what i have in Form, one text box, one Data

Under the Data Properties

Name: Data1
Connect : Access
DataBaseName: C:\Sample\Sampledb.mdt
Default Type: ODBC
Recordset Type: 1 Dynaset
Record Source : (This is the part i had problem with)

The rest are default properties


Under TextBox Property

Name: txtSample
Data Field txtSample
Data Source Data1


There's no coding done yet.

This part I am clueless, I enter administrative tools, DataSource(ODBC) ,
is
there anything i should set in there? so that the textbox inputs can be
saved in my database table?

Have I done anything wrong or missed out certain parts? I was following a
book's procedure.

When i try to change the recordsource in properties, The msgbox popped up
is
this : You cannot emunerate Table names in ODBCDirect mode (Default type
set
to UserODBC)

Clueless about what that means too. Thanks for all help!


What book are you using (it might help to know). How old is it?
You might need to read a little farther.

What version of VB are you using VB6? Standard? Pro? Enterprise? If the
latter two then there are Wizards available to make things a bit easier in
the beginning. When you click "Add... Form" do you see on option to create a
"Data Form Wizard"?

What version of MSAccess are you using?

In the beginning accessing a database from code can be a bit intimidating as
there are a host of new technologies you need to get a passing acquaintance
with. It comes even more confusing to discover that many of these can be
mixed together, and some are mutually exclusive. These technologies are
easier to understand if you note they form a "stack" of blocks or components
that reach from your code to your database...

Your Code -> Uses an Data Access Library (ADO or DAO)
The Data Access Library -> Uses a Provider (ADO) or Driver (ODBC)
The Provider/Driver -> Uses a Connection String to access a Database engine
(In your case the "Jet Engine")
The Jet engine -> Uses your data store (In this case a MDB file).
[I hope the ".mdt" extension is a typo...
DataBaseName: C:\Sample\Sampledb.mdt]

Answer the above questions and we'll see if we can get you going... <g>

-ralph




.



Relevant Pages


Loading