Hi all,

Im getting an error when trying to execute this in VB.NET. It keeps telling me that column 'name' cannot be null but i assure you there is something in the name.value

Im using MySQL 5 as a backend. thing is, this was working when i had a string in which i built the sql statement myself. as you can imagine it got pretty messy so i decided to use params instead so I know this works without params.

sqlcom = "INSERT INTO authors (name, dispname, password, email, country, location, timezone, about, image, disppublic, disppublicifwin) " & _
"VALUES (@name, @dispname, SHA(@password), @email, @country, @location, @timezone, @about, LOAD_FILE(@image), @disppublic, @disppublicifwin);"

db = New OdbcConnection(ConfigurationSettings.AppSettings.Get("dbCon"))
dbCom = New OdbcCommand(sqlcom, db)

'And yes I have tried specifying the size as well.
dbCom.Parameters.Add("@name", OdbcType.Text).Value = name.Value

dbCom.Parameters.Add("@dispname", dispname.Value)
dbCom.Parameters.Add("@password", password.Value)
dbCom.Parameters.Add("@email", email.Value)
dbCom.Parameters.Add("@country", country.Value)
dbCom.Parameters.Add("@location", location.Value)
dbCom.Parameters.Add("@timezone", timezone.Value)
dbCom.Parameters.Add("@about", about.Value)
dbCom.Parameters.Add("@image", saveLocation.Replace("\", "/"))
dbCom.Parameters.Add("@disppublic", disppublic.Checked)
dbCom.Parameters.Add("@disppublicifwin", disppublicifwin.Checked)


If dbCom.ExecuteNonQuery() <> 1 Then
Response.Write("somethings gone wrong")
End If

thanks for taking some spare seconds