sample of using database with dotnet objects

  • Thread starter Thread starter Mr. X.
  • Start date Start date
M

Mr. X.

Hello,
I need a basic sample for using database (connecting ... reading from
database ...
using dataset & datagridview), please.

Thanks :)
 
Mr X,

The basic answer on this question is, why don't you use Google, however that
is almost as long as

In whatever event by instance the load event

\\\
Dim conn = SQLConnection(TheConnectionString)
Dim ds as new dataset
dim da as new SQLDataAdapter("select * from the XTable", conn)
da.fill(ds)
the by you draged datagridview on your form
DataGridView1.DataSource = ds.Tables(0)
///

Besides typos and assuming that you use SQL server, this should show you all
rows from the X table.

Cor
 
Thanks...

I have thought there is connection element, that is on the toolbox.

Also :
For connection string :
Is there any simple way to resolve the connection string
(by some wizard),
if I know the database, the instance and password ?

Thanks :)
 
Thanks...

I have thought there is connection element, that is on the toolbox.

Also :
For connection string :
Is there any simple way to resolve the connection string
(by some wizard),
if I know the database, the instance and password ?

Thanks :)

www.connectionstrings.com

Thanks,

Seth Rowe [MVP]
 
Seth,

I was expecting especially from you something as "Did you not see Cor gave
you the advice to use Google"

I was thinking to include the connection string link, but thought, see what
comes

:-)

Cor
 
I was expecting especially from you something as "Did you not see Cor gave
you the advice to use Google"

lol I thought about that, but apparently whenever I tell someone to
use google, they disregard my post.

:-)

Thanks,

Seth Rowe [MVP]
 
Back
Top