标题:向高手请教关于数据库连接的问题
取消只看楼主
shen8603527
Rank: 1
等 级:新手上路
帖 子:27
专家分:0
注 册:2004-6-2
 问题点数:0 回复次数:17 
向高手请教关于数据库连接的问题

我是一名初学者,正在学关于asp连接数据库方面的知识以下是一个简单代码

<html> <head> <title>沈龙霖</title> </bead> <body> <% set mydata=server.createobject("adodb.connection") mydata.open "addressdata" mydata.execute("insert into address (name,tel) values('骆莉莉','8809223')") mydata.close set mydata=nothing %> </body> </html>

已在数据源中加入了数据库,可是显示结果说

Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005'

[Microsoft][ODBC Microsoft Access Driver] 操作必须使用一个可更新的查询。

/index.asp,行 9

请问是为什么,正确的插入语句应该是怎么样的?

搜索更多相关主题的帖子: 数据库 Microsoft mydata 
2004-06-02 23:00
shen8603527
Rank: 1
等 级:新手上路
帖 子:27
专家分:0
注 册:2004-6-2
得分:0 
什么看看可以吗?请问要看什么?

/home/bbs3/wdb/upload/forum2_f_269_1068812954.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http:///home/bbs3/wdb/upload/forum2_f_269_1068812954.jpg');}" onmousewheel="return imgzoom(this);" alt="" />
2004-06-02 23:04
shen8603527
Rank: 1
等 级:新手上路
帖 子:27
专家分:0
注 册:2004-6-2
得分:0 
不能啊

/home/bbs3/wdb/upload/forum2_f_269_1068812954.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http:///home/bbs3/wdb/upload/forum2_f_269_1068812954.jpg');}" onmousewheel="return imgzoom(this);" alt="" />
2004-06-02 23:09
shen8603527
Rank: 1
等 级:新手上路
帖 子:27
专家分:0
注 册:2004-6-2
得分:0 
驱动啊????那个代码怎么写啊

/home/bbs3/wdb/upload/forum2_f_269_1068812954.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http:///home/bbs3/wdb/upload/forum2_f_269_1068812954.jpg');}" onmousewheel="return imgzoom(this);" alt="" />
2004-06-02 23:10
shen8603527
Rank: 1
等 级:新手上路
帖 子:27
专家分:0
注 册:2004-6-2
得分:0 

Microsoft VBScript 编译器错误 错误 '800a0408'

无效字符

/index.asp,行 11

conn.execute("insert into address (name,tel) values("骆莉",'8809223')")
这就是结果

/home/bbs3/wdb/upload/forum2_f_269_1068812954.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http:///home/bbs3/wdb/upload/forum2_f_269_1068812954.jpg');}" onmousewheel="return imgzoom(this);" alt="" />
2004-06-02 23:24
shen8603527
Rank: 1
等 级:新手上路
帖 子:27
专家分:0
注 册:2004-6-2
得分:0 

会不会是其它因啊


/home/bbs3/wdb/upload/forum2_f_269_1068812954.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http:///home/bbs3/wdb/upload/forum2_f_269_1068812954.jpg');}" onmousewheel="return imgzoom(this);" alt="" />
2004-06-02 23:26
shen8603527
Rank: 1
等 级:新手上路
帖 子:27
专家分:0
注 册:2004-6-2
得分:0 
belin2000我能知道你的qq号吗?

/home/bbs3/wdb/upload/forum2_f_269_1068812954.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http:///home/bbs3/wdb/upload/forum2_f_269_1068812954.jpg');}" onmousewheel="return imgzoom(this);" alt="" />
2004-06-02 23:27
shen8603527
Rank: 1
等 级:新手上路
帖 子:27
专家分:0
注 册:2004-6-2
得分:0 
是文本型的啊

/home/bbs3/wdb/upload/forum2_f_269_1068812954.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http:///home/bbs3/wdb/upload/forum2_f_269_1068812954.jpg');}" onmousewheel="return imgzoom(this);" alt="" />
2004-06-02 23:31
shen8603527
Rank: 1
等 级:新手上路
帖 子:27
专家分:0
注 册:2004-6-2
得分:0 
不行啊,好像这个语句中VALUES()里的内容不能出现“”不然就显示语句有无效字符

/home/bbs3/wdb/upload/forum2_f_269_1068812954.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http:///home/bbs3/wdb/upload/forum2_f_269_1068812954.jpg');}" onmousewheel="return imgzoom(this);" alt="" />
2004-06-02 23:40
shen8603527
Rank: 1
等 级:新手上路
帖 子:27
专家分:0
注 册:2004-6-2
得分:0 
QQ号QQ号QQ号

/home/bbs3/wdb/upload/forum2_f_269_1068812954.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http:///home/bbs3/wdb/upload/forum2_f_269_1068812954.jpg');}" onmousewheel="return imgzoom(this);" alt="" />
2004-06-02 23:41



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-1974-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.027714 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved