| | |
Why does it insert NULL values into MySQL DB???
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Mar 2006
Posts: 11
Reputation:
Solved Threads: 0
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()
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()
•
•
Join Date: Jan 2007
Posts: 29
Reputation:
Solved Threads: 0
hai,
just try this out.
try this out .it worked for me. the data is getting inserted into MySQL database.
just try this out.
•
•
•
•
Dim con As OdbcConnection
Dim str As String
Dim cmd As OdbcCommand
con = New OdbcConnection
(ConfigurationSettings.AppSettings("ConnectionString"))
str = "insert into newuser_details values('" & txtusername.Text & "','" & txtpassword.Text & "')"
cmd = New OdbcCommand(str, con)
con.Open()
cmd.ExecuteNonQuery()
con.close()
![]() |
Similar Threads
- datagrid replacing null values (VB.NET)
- how to select null values in condition (MySQL)
- Exception Data is Null. This method or property cannot be called on Null values. (VB.NET)
- search (MS SQL)
- Need help diplaying null values (PHP)
- help with polymorphism and inheritance...getting null values (Java)
Other Threads in the ASP.NET Forum
- Previous Thread: Asp.net
- Next Thread: Microsoft.BusinessFramework, or one of its dependencies, was not found
| Thread Tools | Search this Thread |
.net 2.0 3.5 ajax appliances application asp asp.net beginner box browser businesslogiclayer button c# cac checkbox child class compatible content contenttype control countryselector courier dataaccesslayer database datagrid datagridview datalist deployment development dgv dialog dropdownmenu dynamic dynamically edit embeddingactivexcontrol feedback fileuploader fill findcontrol flash flv form gridview gudi iis image javascript list listbox maps menu mobile mouse mssql nameisnotdeclared news novell opera order parent problem radio ratings redirect registration relationaldatabases reportemail schoolproject search security select serializesmo.table sessionvariables silverlight smoobjects software sql sql-server ssl tracking treeview typeof validatedate validation vb.net videos vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment webprogramming wizard xsl





