Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL DataAdapter Help

Status
Not open for further replies.

LonnieJohnson

Programmer
Apr 16, 2001
2,628
US
There seems to be a limit to how many fields can be selected when configuring a data adapter. If so how many? I saw one post that suggested it was 200? I have a table with 227 fields. (Please no normalization speeches, :-D, I've already tried to remove some of the fields from the table. Long story. ) Anyway, I am very very new to vb.Net. I come from Access. Can I have two data adapters and split the table. That sounds like a lot of work.

Need direction.

ProDev, MS Access Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
I guess you could create a view on the server with only some of the fields or you could make one column out of concatenating several others (COL1;col2;col3...), but in any case it looks like you are in for some loooooong SQL statements. Have you tried to select it as a table instead of an SQL statement? Use c.CommandType=CommandType.TableDirect .
What error message does it give?
 
When I try to configure the adapter using the wizard, I get this message.

It just says "Unable to configure adapter" right after I pick the fields I want and click Next.

ProDev, MS Access Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
Are you using SQL SERVER? If so 200 is not the right # of fields allowed. Both SQL Server 7.0 and 2000 allows upto 4,096 columns per SELECT. Here is the link that explains it.

-Kris
 
Yes, I am using SQL Server 2000. I am VB.Net and trying to use the SQL Adapter Wizard and it fails when I try to select too many fields from the grid.

I searched the internet for the error and found a post that said that the wizard had some problems with more than 200 fields being selected for the adapter.

I am going to use the wizard and pick a few fields, then go to the properties window and add theo the others that I need and see if that works.

ProDev, MS Access Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top