944,017 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Marked Solved
  • Views: 533
  • C# RSS
Oct 20th, 2009
0

Table columns intellisense in c#

Expand Post »
Hi ,
I am busy converting a VB6 project to c#.
Now in vb6 , the columns have intellisense like so...

VB Syntax (Toggle Plain Text)
  1. rsIBBSData!DrOrCr = 1 'rs is the recordset

But in c# , i would either have to create an sql query , or use datarow with a column index or column name as index.

Having to use column index is error prone , and having to type column name is burdensome(many columns in tables) .

I know it is something along the lines of creating dataset(via datasources wizard) and/or table adapter .
Pls give me instructions if you know how.(no commercial products or complex procedures please)

-Thanks
Last edited by stoymigo; Oct 20th, 2009 at 10:52 am.
Similar Threads
Reputation Points: 8
Solved Threads: 2
Junior Poster in Training
stoymigo is offline Offline
52 posts
since Aug 2008
Oct 20th, 2009
0
Re: Table columns intellisense in c#
What i've done so far is to add a data source (i.e a dataset including only one table).
I am getting the intellisense , and am about to test inserting a record (I have not set non null fields).
Reputation Points: 8
Solved Threads: 2
Junior Poster in Training
stoymigo is offline Offline
52 posts
since Aug 2008
Oct 20th, 2009
0
Re: Table columns intellisense in c#
It sounds like you're on the right track. You know what you need to do so I don't understand what you're asking. If you have a specific question about creating a dataset or its' behavior then please update the thread with your question.
Featured Poster
Reputation Points: 1749
Solved Threads: 735
Senior Poster
sknake is offline Offline
3,948 posts
since Feb 2009
Oct 20th, 2009
0
Re: Table columns intellisense in c#
Problem is solved ,
I did the above , in runtime I had to change the connection string , and whichever fields of a row I did not set , then a default null was inserted.If the field was not nullable then I would get a compile-time error which is better than runtime.

Further suggestions are still welcome...
Reputation Points: 8
Solved Threads: 2
Junior Poster in Training
stoymigo is offline Offline
52 posts
since Aug 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: problem in inserting data by using checkedlistbox in database
Next Thread in C# Forum Timeline: IndexOf() in C#





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC