鐵之狂傲
標題:
找不到可安裝的 ISAM
[列印本頁]
作者:
chaser
時間:
05-6-13 02:55
標題:
找不到可安裝的 ISAM
這是我寫的..可不可以麻煩懂資料庫的大大看一下出了什麻問題
執行的時後出現
找不到可安裝的 ISAM
找不到決解的方法 QQ
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<html>
<head>
</head>
<body>
<form runat="server">
</form>
<table>
<tr><td>性名:<asp:textBox id="user1" text="" runat="server" /><br></td></tr>
<tr><td>內容:<asp:textBox id="Message" textmode="Multiline" columns="30" rows="5" runat="server" /><br></td></tr>
<tr><td><asp:button id="bbb" text="送出" runat="server" /></tr></td>
<tr><td><asp:Label id="talkout" runat="server" /></tr></td>
</table>
</body>
</html>
<Script Language="VB" Runat="Server">
Dim objCon As OleDbConnection
Dim objCmd As OleDbCommand
Dim StrDbCon ="Provider=Microsoft.Jet.OLEDB.4.0;Data Cource=" & Server.Mappath("talk.mdb")
Sub Page_Load(sender As Object, e As EventArgs)
If isPostBack Then
addGuestBook()
End If
ViewGuestBook()
End Sub
Sub addGuestBook()
Dim strUser , strMessage , strSQL as string
strUser = user1.text
strMessage = Message.text
strSQL = "INSERT INTO Talk(Ttim,UserName,Message) "
strSQL &= "VALUES('" & DateTime.Now.Tostring() & "','"
strSQL &= strUser & "','"
strSQL &= Replace(strMessage,"'","''") & "')"
objCon = New OleDbConnection(strDbCon)
objCon.open()
objCmd = New OleDbCommand(strSQL , objCon)
objCmd.ExecuteNonQuery()
objCon.Close()
End Sub
Sub viewGuestBook()
Dim StrSQL , output As string
objCon = New OleDbConnection(strDbCon)
objCon.Open()
strSQL="SELECT * FROM 留言版 ORDER BY Ttime DESC"
objCmd = New OleDbCommand(strSQL, objCon)
Dim objDataReader As OleDbDataReader
objDataReader = objCmd.ExecuteReader()
While objDataReader.Read()
output &= "<b>日期</b><p>" & objDataReader.Item("Ttime") & "<br>"
output &= objDataReader.Item("UserName") & "說:" &"<br>"
output &= objDataReader.Item("Message") & "</p><hr>"
End While
objDataReader.Close()
objCon.Close()
talkout.text = output
End Sub
</Script>
talk.rar
05-6-13 02:55 上傳
點選檔案名稱下載附件
20 Bytes, 下載次數: 189
歡迎光臨 鐵之狂傲 (https://gamez.com.tw/)