| Author: srilu 22 Jan 2008 | Member Level: Diamond | Rating: Points: 2 |
Check the data type of that variable in your database and the data type you need to show in the front end?
If it is numeric in the database,use convert.toint32 in the front end. If it is varchar in the database,use convert.tostring
|
| Author: santhosh 22 Jan 2008 | Member Level: Gold | Rating: Points: 2 |
hi
your question is a bit harder to understand. Plz make it clear..
instead of using int or string, U better use object type.
Its better to use Objects if we don't know what type of data is to be loaded in that variable.
|
| Author: Shanmugam 22 Jan 2008 | Member Level: Gold | Rating: Points: 2 |
Can you post your conversion code?
|
| Author: santhosh 22 Jan 2008 | Member Level: Gold | Rating: Points: 2 |
hi
your question is a bit harder to understand. Plz make it clear..
instead of using int or string, U better use object type.
Its better to use Objects if we don't know what type of data is to be loaded in that variable.
|
| Author: Krishna Prasad RVS 22 Jan 2008 | Member Level: Gold | Rating: Points: 2 |
Hi,
Please provide the database column datatype, if you are declaring the varible of same type, it should work
Please provide details.
Krishna
|
| Author: Lakshmanan M 22 Jan 2008 | Member Level: Bronze | Rating: Points: 2 |
Can u Explain in detail?
For Getting data from DB which one u r using Data Adapter or DataReader?
if ur initializing a variable as string , while assigning the result to the variable u hav to use .ToSting() to convert the object to string value.
|
| Author: Krishna Prasad RVS 22 Jan 2008 | Member Level: Gold | Rating: Points: 2 |
You should declare a variable of the same data type of the specific database column for which you are declaring a variable to store the data
|
| Author: Guruswamy T L 22 Jan 2008 | Member Level: Silver | Rating: Points: 2 |
if i declare as object same error will come
|