C# 更新access问题!大侠请进
1.这样可以:
command.CommandText = @"Update college Set name='mick' where ID=" + textBox3.Text;
2.这样却不行:
command.CommandText = @"Update college Set name=" + textBox1.Text + @"where ID=" + textBox3.Text;
错误信息:
未处理的“System.Data.OleDb.OleDbException”类型的异常出现在 System.Data.dll 中。
其他信息: 语法错误 (操作符丢失) 在查询表达式 'mickwhere ID=1' 中。
3.这样仍然不行:(where前面加了个空格)
command.CommandText = @"Update college Set name= " + textBox1.Text + @" where ID=" + textBox3.Text;
错误信息:
未处理的“System.Data.OleDb.OleDbException”类型的异常出现在 System.Data.dll 中。
其他信息: 至少一个参数没有被指定值。
请问应如何处理?
急 多谢!!!!
2.这样却不行:
command.CommandText = @"Update college Set name=" + textBox1.Text + @"where ID=" + textBox3.Text;
错误信息:
未处理的“System.Data.OleDb.OleDbException”类型的异常出现在 System.Data.dll 中。
其他信息: 语法错误 (操作符丢失) 在查询表达式 'mickwhere ID=1' 中。
说的很清楚了, 语法错误 name='" + textBox1.Text + "' where ID=" where前面加空格,text内容用引号
试试楼上的方法,把单引号包含在字符串里面。
textBox1.Text 字符串前后加 单引号:
command.CommandText = @"U
相关问答:
//C 接口
extern "C"
{
TESSDLL_API int __cdecl GetTessText(const char *imagefile, char *text);
}
//我在C#中声明
//调用C DLL 中的函数
[DllImport("OCRapi.dll&quo ......
c# 有没有用于C/S的 html文本编辑器
就像web界面的文本内容编辑器
up
C/S还要编译器干嘛啊
又不用控制样式
貌似没有吧 如果有了通知下我 我也要liujintaohfbb@163.com我的邮箱 ......
PHP 如何和 C# 通过SOKET进行通信
希望能有详细的例子
自己顶一下
没做过
要有一人做监听服务器
第二个是soap请求
第三个注意参数类型是不是一样
<?php
if(!extension_loaded( ......
_RecordsetPtr CMyAdo::SelectRecord(string &where, string &tablename,string &field, int way )
{
int ret = 0;
_RecordsetPtr pset;
CString sql;
& ......
要组合4张表的查询,分别是A表,B表,C表,D表;
A表
Game_id Game_Name
1 abc
B表
Category_ID Category_Name Game_id
& ......