using sqldataadpater you can do it almost same way as in VB6.
for a sample on howto use sqldataadapter check this http://msdn.microsoft.com/
Main Topics
Browse All TopicsWhen working in VB.net with ADO.net my INSERT statements look the first piece of code below. This iis OK for a when a few fields are being imported. However, many tables I work with have over 100 fields. This format of the INSERT statement is cumbersome to construct and a nightmare to debug when I make a typo.
The way I used to do this in VB6 is listed below the VB.net sample. This format is much easier to construct (I used to use Excel). Is there anything similar that I could do in VB.net? Are there any alternatives at all to the Insert Statement I have written?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
using sqldataadpater you can do it almost same way as in VB6.
for a sample on howto use sqldataadapter check this http://msdn.microsoft.com/
another sample http://support.microsoft.c
>>This iis OK for a when a few fields are being imported. However, many tables I work with have over 100 fields. <<
Sounds like you need to do some normalizing. 100 columns sounds excessive.
>>Are there any alternatives at all to the Insert Statement I have written?<<
This is why Stored Procedures were invented (well not exactly). You still have to write the INSERT statement, but debugging is a lot easier and you can use the tools in SSMS to produce the column names, without the typeing. Did I mention it gives you better performance and security as well?
Based on everyone's input, I have found the solution. Actually, I have found how to do it with ADO.Net and ADODB. See the samples below (Sorry, I didn't take the time to clean it up. I am at work).
Anyway, since I can use either method, ADO.NET or ADODB, can someone tell me why one is preferable over the other? I do not use autopopulating grids of any type.
Appari:Thanks your link started my search in the right direction. I didn't understand the link you provided (It was me not the link) but eventually I found a similar explanation I could understand. And you are right I was asking about ADO.Net.
advfinance: Thanks for providing the ADODB solution even though I didn't ask for it. I thought ADODB could not be used in VB.net. Because of it's simplicity, I will probably use ADODB to do my inserts when I have a large number of fields. I have heard that ADO.Net is 3 to 4 times as fast as ADODB but I will probably take the performance hit on my inserts.
acperkins: This is database is not mine to control. But I have been working with it for over 15 years. I assure you it has been normalized. But in a large ERP solution, there is a lot of info to be stored.
Business Accounts
Answer for Membership
by: prabhakaranbkPosted on 2009-10-15 at 17:20:51ID: 25586076
You can simpley use without specifiying column names but you should supply all values of the columns and it should be in same order as table structure.
Insert into tableA values(yourvalues)