TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Gustavo
NA
1.3k
454.5k
How do I: Read the data selected?
Mar 15 2010 5:49 PM
Hello:
I am using the following code to get a record. In the
DBDataAdapter
, how do I get the specific field I want?
It does not like the
ReadRecord
.
DBSQLSelect =
"SELECT "
+
" [SEQNO]"
+
" ,[Status_ID]"
+
" ,[Class_ID]"
+
" ,[Group_ID]"
+
" ,[Type_ID]"
+
" ,[CreateBy]"
+
" ,[CreateDate]"
+
" ,[CreateTime]"
+
" ,[Note]"
+
" ,[Address_1]"
+
" ,[Address_2]"
+
" ,[Address_3]"
+
" ,[City]"
+
" ,[State_ID]"
+
" ,[Zip_ID"
+
" ,[Phone]"
+
" ,[Fax]"
+
" ,[WebSite]"
+
" FROM"
+
" ["
+ FileName +
"]"
+
" WHERE"
+
" [Company_ID] = '"
+ textBoxCompany_ID.Text +
"'"
;
//MessageBox.Show("DBSQLSelect=" + DBSQLSelect);
//
Program
.SQLSelect(DBSQLSelect);
//
SqlDataAdapter
DBDataAdapter =
new
SqlDataAdapter
(
Program
.ProgramDBSelect,
Program
.ProgramDBConnection);
SqlDataReader
ReadRecord;
textBoxName.Text =
ReadRecord
.GetString(ReadRecord.GetOrdinal(
"Name"
));
Reply
Answers (
12
)
count line of code executed
C# Stack Trace Formatting Tool