![]() |
| ||
| database problem mydb thedb = new mydb(); this code is try to grab the value from _ddsearch variable if the value is number it works but if it is string, theReader return null this is the problem string _sql = "SELECT * FROM searchtest WHERE ID = " + _ddsearch; the code above is for number how do you make ID = " + _ddsearch;to get variable value as string I try to put another qutation mark but it is still wrong |
| ||
| Re: database problem Is ID a string? |
| ||
| Re: database problem it probably needs quote marks round it too or it will try and think its a column name |
| ||
| Re: database problem the problem is that theReader return string and the variable return int(number) which is i have to format it to string to make the reader read |
| ||
| Re: database problem then do just that :) Have a guess. |
| All times are GMT -4. The time now is 7:27 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC