dAdapter.FillSchema vs dAdapter.Fill with dataset.clear?

G

Guest

Hello,

I want to use a dataAdapter to insert rows into a table on a sql server DB.
I understand that the DataAdapter will automatically handle concurrency
issues. So first I have to get a table to insert a row into. I have been
doing this:

da.SelectCommand = New SqlCommand("Select * from tbl1", conn)
da.FillSchema(ds, SchemaType.Source, "tbl1")
....
my other method was this:

da.SelectCommand = New SqlCommand("Select * from tbl1", conn)
da.Fill(ds, "tbl1")
ds.Clear

I read one post of someone who said that the Fillschema method used more
resource than the Fill method. But I am thinking, what if I already have a
ton of rows in the table? I only need the schema of the table to insert a
new row into. Any suggestions appreciated which method is the best practice
- or if neither method above is best practice - what would be a best practice
method?

Thanks,
Rich
 
R

rowe_newsgroups

Any suggestions appreciated which method is the best practice
- or if neither method above is best practice - what would be a best practice
method?

Can you elaborate on what exactly you need to accomplish?
I want to use a dataAdapter to insert rows into a table on a sql server DB.

Also is tbl1 in the same SQL server db that you are wanting to insert
rows into?

Thanks,

Seth Rowe
 

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

Top