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



Hi Ralph,
The book i was following is : The complete reference Visual Basic 6 , by
Noel Jerke Copyrighted @ 1999, Pages 110 onwards..I tried his example on a
smaller scale , meaning out of all the 5 textboxs in his examples i used only
1 textbox to help me appreciate the idea at a lower complexity, but found
that I could not get it properly done

My version is VB6
MS Access is 2000

Oops..that was a typo, it is a .mdb , apologies~!

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).

Can i have an idea of how I should key them, or learn how to configure them?
Thanks Ralph!


"Ralph" wrote:


"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

  • Re: Is ODBC right for me?
    ... I think the new ACCDB ... format utilises the new JET engine (and JET engine was supposed to be in ... I think the major bottleneck in most database application is network ...
    (microsoft.public.sqlserver.odbc)
  • Re: Is ODBC right for me?
    ... I think the new ACCDB ... format utilises the new JET engine (and JET engine was supposed to be in ... I think the major bottleneck in most database application is network ...
    (microsoft.public.sqlserver.odbc)
  • Re: Back-to-front introduction needed
    ... >working with a database engine of some kind. ... The engine does all of the physical IO in binary. ... The JET engine to provide the functionality to query and maintain ... But in the context of distributing a new program that can create and ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: What is Postback?
    ... With ASP.NET we have the concept of a postback. ... Now the TextBox is displayed on the webpage with the value from the database ... The Page_Load event fires, queries the database, and populates the ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: What is Postback?
    ... With ASP.NET we have the concept of a postback. ... Now the TextBox is displayed on the webpage with the value from the database ... The Page_Load event fires, queries the database, and populates the ...
    (microsoft.public.dotnet.framework.aspnet)