|
-
Feb 18th, 2006, 09:28 PM
#1
Thread Starter
Addicted Member
[RESOLVED] I Need TABLENAME & ColumnName From DataReader
Ok, I'm using MySQL and a Datareader. I couldn't do the whole
Variable = dr.GetValue(#) because the Databases are dynamic.
so I have to create a quick chart in runtime.
It's like
ColumName = 0
ColumnName = 1
ColumnName = 2
then I can do dr.GetValue(ColumnName) (and it will put in my #)
now, the issues comes up on the ColumnName. I can't just use
Price because, that is in multiple Tables in the join. I need to do
TableName.Price.
I've tried both
DataReader.GetSchemaTable() (Looked through all properties)
and the DataReader.GetName(#)
Yeah... they get the Name of the Column, but not The TableName.
VB Code:
SELECT Body.* FROM Body
LEFT JOIN medispan.* ON body.transaction_id=medispan.transaction_id
LEFT JOIN fdb.* ON body.transaction_id=fdb.transaction_id
WHERE medispan.transaction_id IS NOT NULL;
ok, so look at this statement, the tables medispan and fdb are almost identical, they are two different pricing sources. so I need a columnname of "fdb.columnname" to be given to me from the DataReader. Is it possible to get the table that the Column comes from?
Last edited by SpeedyDog; Feb 18th, 2006 at 10:41 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|