THIS ADO.NET IS DRIVES ME M.A.D.

  • Thread starter Thread starter Eddy Balan
  • Start date Start date
E

Eddy Balan

HELLLLLLLLPPPPPPPPPPP

If is anyone there who cant show me some things that I couldn't understand.

How can I change am OLEDBCommad query and fill a Dataset

Thank you
Eddy
 
If you posted the code snippet that's giving you trouble, I could be more
specific, but the short answer to your question is simply change the
commandtext.

MyCommand.CommandText = "SELECT * FROM SOMETABLE"

//Your connection code here.
da.SelectCommand = MyCommand
da.Fill(SomeTable)

Now,
MyCommand.CommandText = "SELECT * FROM SOMEOTHERTABLE"

then just do the same da.Fill(SomeTable)

Granted, there are a lot of what if's here, so while this will work, the
explanation is oversimplified.
However, if you post the code, I'd be glad to take a more detailed look at
it.

HTH,

Bill
 
Hi Eddy,
Is this VB code driving you crazy, and that is really all you need to get a
dataset.
\\\
Dim Conn As New SqlConnection(connString)
Dim cmd As New SqlCommand("Select * from db", Conn)
Dim dsnew As New DataSet
da = New SqlDataAdapter(cmd)
da.Fill(dsnew)
///
I hope it heals you :-))

(When it has to be OleDB you have to change Sql for OleDb)

Cor
 
Back
Top