原來asp+acess資料庫讀取和寫入是沒有問題的,
將acess資料庫匯入sqlserver2000,讀取資料沒有問題,但是不能寫入資料。
寫入程式沒變過,如下所示
<%dim conn
dim connstr
on error resume next
connstr="driver={SQL Server};server=127.0.0.1; uid=sa;pwd=123456;database=test2"
set conn=server.createobject("ADODB.CONNECTION")
%>
'以上為鏈接資料庫陳述句
'以下為寫入資料陳述句
<%sql="select * from product where acticleid=476"
set rs=server.createobject("Adodb.recordset")
rs.open sql,conn,1,3
rs("title")="更改標題"
rs.update
rs.close
set rs=nothing
%>
在sqlserver2000查詢分析器中直接輸入sql陳述句【update product set title='測驗標題' where articleid=476】
是可以修改資料的。
uj5u.com熱心網友回復:
問題 已解決:將product表中的欄位,允許為空全部打上√,設定articleid為主鍵,問題解決了轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/167337.html
標籤:ASP
下一篇:鎖相環APLL仿真介紹
