![]() |
| ||
| Why does it insert NULL values into MySQL DB??? Dim strInsert As String Dim cmdInsert As OdbcCommand Dim cn As OdbcConnection cn = New _ OdbcConnection(ConfigurationSettings.AppSettings("ConnectionString")) strInsert = "Insert into realestate.city_master(city_Name)Values(city_name);" cmdInsert = New OdbcCommand(strInsert, cn) cmdInsert.Parameters.Add("city_Name", city_name.Text) cn.Open() cmdInsert.ExecuteNonQuery() city_name.Text = "" cn.Close() |
| ||
| Re: Why does it insert NULL values into MySQL DB??? well, what is the value of city_name.Text when you run the query |
| ||
| Re: Why does it insert NULL values into MySQL DB??? hai, just try this out. Quote:
|
| ||
| Re: Why does it insert NULL values into MySQL DB??? that would not be a good way to do it. Opening yourself up to a SQL-injection attack |
| All times are GMT -4. The time now is 9:42 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC