Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
C#/ SQL - How can I do this?
Old 12-08-2004, 04:58 PM C#/ SQL - How can I do this?
Average Talker

Posts: 23
Trades: 0
Hi All,

I need to be able to retrieve and parse all field names of an SQL database table via C#.

So far I've been able to do it using oledb AND have been able to get the schema using a reader and executing "SELECT * FROM SOMETHABLENAME" and then using rdrReader.GetSchemaTable(). But my problem with that is that I don't want to use a predetermined table name. I need to query tables dynamically and then query field names dynamically too.

Any suggestions and help is greatly appreciated.

Thanks in advance,
Khemal
__________________

Got Projects? Need Help? Want Experts To Compete For You?
Come Join The Internet Marketing Freelance Warriors for free.


Please login or register to view this content. Registration is FREE

FreelanceWork is offline
Reply With Quote
View Public Profile Visit FreelanceWork's homepage!
 
 
Register now for full access!
Old 12-12-2004, 01:20 AM
WebcyteDesign's Avatar
Registered User

Posts: 159
Location: Hamilton
Trades: 0
Apparently oledbSchemaGuid is what you should use for this.
Hope these places help.

http://www.dotnet247.com/247referenc...29/146507.aspx - at bottom of page gives example

This will show you all the methods:
http://msdn.microsoft.com/library/de...mberstopic.asp

Have fun.
WebcyteDesign is offline
Reply With Quote
View Public Profile Visit WebcyteDesign's homepage!
 
Old 12-13-2004, 11:05 AM
Average Talker

Posts: 23
Trades: 0
Cool! Thanks. Will try it out.
__________________

Got Projects? Need Help? Want Experts To Compete For You?
Come Join The Internet Marketing Freelance Warriors for free.


Please login or register to view this content. Registration is FREE

FreelanceWork is offline
Reply With Quote
View Public Profile Visit FreelanceWork's homepage!
 
Reply     « Reply to C#/ SQL - How can I do this?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.33465 seconds with 12 queries