using database in dotnet IDE

  • Thread starter Thread starter Cor Ligthert
  • Start date Start date
C

Cor Ligthert

John,

This is nicer, I showed that link in the message below, because I found it
not a method to ask in that ugly way here a question.

The most simple code what you have to place your form load event when you
have dragged a datagrid on your form and clicked on your form where that
form event shows than up.
\\\
dim ds as new dataset
dim conn as new oledb.oledbconnection(SeeLinkBellowForThat)
dim da as new oledb.oledbdataadapter("Select * from mydatabasetable",conn)
da.fill(ds)
datagrid1.datasource = ds.tables(0)
///
When it is SQLserver change than Oledb.Oledb in SQLClient.SQL the same is
for Oracle, however check that than yourself.

Your complete databasetable will be showed. Typed in this message so watch
typos.

www.connectionstrings.com

I hope this helps

Cor
 
John,
The most simple code what you have to place your form load event when you
have dragged a datagrid on your form and clicked on your form where that
form event shows than up.

I changed the sentence above to many times

The most simple is, to place the code bellow in your form load event. You
get this when you drag first a datagrid from the toolbox on your form. Than
you click on an empty place on your form and then the load event will be
created and the code will be showed. You can then place the code I showed
you, inside that event and start debugging.

Cor
 
Hello,

In the IDE of microsoft visual studio .NET 2003 :

How can I use simple database using a connectionString, and a data-grid that
linked to a database table (i.e mdb - only within the IDE environment of the
Microsot Visual Studio .NET 2003, and link some of the fields to a database
table/query) ?

Should I use the oleDBConnectionString (but what other components I should
use) ?

Need a sample, please.

Thanks :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top