在SQL SERVER中,可以这样操作:
myCommand = New OleDb.OleDbCommand("insert into Category(categoryName,categoryID,Icon,parentCategoryID,content,Content_noHtml,categorylevel,CategoryClass,hyperlink,categoryEnabled,Visittimes,LastUpdated,[language],categoryOrder,ProductID,ProductPrice,Productor,Saler,ProductImage) values(@categoryName,@categoryID,@Icon,@parentCategoryID,@content,@Content_noHtml,@categorylevel,@CategoryClass,@hyperlink,@categoryEnabled,@Visittimes,@LastUpdated,@language,@categoryOrder,@ProductID,@ProductPrice,@Productor,@Saler,@ProductImage)", myConnection) myCommand.Parameters.Add(New OleDb.OleDbParameter("@categoryID", OleDb.OleDbType.Char, 16))
myCommand.Parameters("@categoryID").Value = Trim(txtboxCategoryID.Text)在ACCESS中也可以这样吗?遇到备注型字段应该怎么处理,是不是OleDb.OleDbType.Char, 65536?
myCommand = New OleDb.OleDbCommand("insert into Category(categoryName,categoryID,Icon,parentCategoryID,content,Content_noHtml,categorylevel,CategoryClass,hyperlink,categoryEnabled,Visittimes,LastUpdated,[language],categoryOrder,ProductID,ProductPrice,Productor,Saler,ProductImage) values(@categoryName,@categoryID,@Icon,@parentCategoryID,@content,@Content_noHtml,@categorylevel,@CategoryClass,@hyperlink,@categoryEnabled,@Visittimes,@LastUpdated,@language,@categoryOrder,@ProductID,@ProductPrice,@Productor,@Saler,@ProductImage)", myConnection) myCommand.Parameters.Add(New OleDb.OleDbParameter("@categoryID", OleDb.OleDbType.Char, 16))
myCommand.Parameters("@categoryID").Value = Trim(txtboxCategoryID.Text)在ACCESS中也可以这样吗?遇到备注型字段应该怎么处理,是不是OleDb.OleDbType.Char, 65536?
解决方案 »
- asp.net 动态创建linkbutton,并且为每个按钮绑定一个事件
- System.Drawing.Image.FromFile(path) 不能正确判断桌面文件
- 问了第三遍了,死活是添加不了数据!!!!!!!
- 在.NET中使用XMLhttp下载文件.求教
- 怎麼在將前台script腳本中調用後台函數呢
- 针式打印机 打印的问题。
- 急!咨询高手,为何打不开页面?
- 问一下空格的转义字符是多少?
- 员工基本信息管理系统怎么做?
- 关于转换问题
- System.InvalidCastException: Specified cast is not valid. 是什么错误?
- 如何防止直接输入URL进入某个页面
另外,如果是OLED字段,必须使用LongVarBinary