asp.net聊天室 关于写数据库
来源:百度知道 编辑:UC知道 时间:2024/05/18 07:47:30
Sub Sure_Click(ByVal Sender As Object, ByVal E As EventArgs) Handles Sure.Click
Dim StrCnn As String
Dim Sql As String
Dim theText As String
Dim theObj As String
Dim theFace As String
Dim theFont As String
Dim FacePic As String
theText = T1.Text '获取用户的发言信息
theObj = drop.SelectedItem.Text '获取用户所选择的聊天对象
theFace = drop1.SelectedItem.Text '获取用户所选择的表情
theFont = drop2.SelectedItem.Value '获取用户所选择的字体颜色
FacePic = drop3.SelectedItem.Value '获取用户所选择的贴图
'连接数据库
StrCnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(" lts.mdb")
Cnn = New OleDbConnection(StrCnn)
Cnn.Open()
'保存用户的发言信息,其中发言人通过Session变量username来获取
Sql = "insert into content(talker,toobj,color,content,facestr,facepic) values('&qu
Dim StrCnn As String
Dim Sql As String
Dim theText As String
Dim theObj As String
Dim theFace As String
Dim theFont As String
Dim FacePic As String
theText = T1.Text '获取用户的发言信息
theObj = drop.SelectedItem.Text '获取用户所选择的聊天对象
theFace = drop1.SelectedItem.Text '获取用户所选择的表情
theFont = drop2.SelectedItem.Value '获取用户所选择的字体颜色
FacePic = drop3.SelectedItem.Value '获取用户所选择的贴图
'连接数据库
StrCnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(" lts.mdb")
Cnn = New OleDbConnection(StrCnn)
Cnn.Open()
'保存用户的发言信息,其中发言人通过Session变量username来获取
Sql = "insert into content(talker,toobj,color,content,facestr,facepic) values('&qu