DataReader problem

bluetorch

Member
Joined
Mar 16, 2005
Messages
6
Programming Experience
1-3
I have a problem with my datarader, i'm trying to read with a variable, is this possible ?

example :

Dim test as String = "Name"

objReader(test)

objReader.Close()
 

bluetorch

Member
Joined
Mar 16, 2005
Messages
6
Programming Experience
1-3
My problem is, i need to get a table name and column name from one table X and use this table name to get in to table Y and select there the column i got from table X.

I need to check the last value of that column , and see if it has exceeded its max value ( just a number ).

Is this possible to make with datasets ? , or Datareaders ?


plz help

thx in advance
 

Tarik

Active member
Joined
Apr 16, 2005
Messages
41
Location
Egypt-Alexandria
Programming Experience
3-5
with the first question i think you need to read a specific column from the reader according to a variable inserted (i hope i understood you)
i have attached a sample work with NorthWind DB just change the Connection String
I need to check the last value of that column , and see if it has exceeded its max value ( just a number ).
simple SQL Statement could do that in case that the column was identity column
VB.NET:
/* Return The Last inserted Identity Value On Current Session */
select @@IDENTITY
/*Another Method*/
/* Return The Last inserted Identity Value In ALL scopes And Sessions */
select IDENT_CURRENT('TestIdentity')
checks books online for that
i need to get a table name and column name from one table X and use this table name to get in to table Y and select there the column i got from table X
you mean to copy the table with another name or you mean something else
 

Attachments

  • ReadItemFromReader.zip
    20.5 KB · Views: 33
Top Bottom