vb6.0连接上了oracle数据库,怎么使用textbook控件录入文本并写入到数据库的指定表格中
PublicmyconAsNewADODB.ConnectionPublicFunctionconndb()DimrstAsADODB.RecordsetSetmycon...
Public mycon As New ADODB.Connection
Public Function conndb()
Dim rst As ADODB.Recordset
Set mycon = New ADODB.Connection
mycon.ConnectionString = connstring
mycon.Open
End Function
Public Function connstring() As String '打开数据库
connstring = " Provider=OraOLEDB.Oracle;" _
& " Password=picuser;User ID=picuser;" _
& " Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP) " _
& " (HOST =127.0.0.1)(PORT=1521)))" _
& " (CONNECT_DATA=(SERVICE_NAME=xe)));" _
& " Persist Security Info=True "
'
End Function
这个是连接数据库的函数
然后还有一个问题 怎么从File1.FileName 提取到文件名的文本值写入到数据库中?? 展开
Public Function conndb()
Dim rst As ADODB.Recordset
Set mycon = New ADODB.Connection
mycon.ConnectionString = connstring
mycon.Open
End Function
Public Function connstring() As String '打开数据库
connstring = " Provider=OraOLEDB.Oracle;" _
& " Password=picuser;User ID=picuser;" _
& " Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP) " _
& " (HOST =127.0.0.1)(PORT=1521)))" _
& " (CONNECT_DATA=(SERVICE_NAME=xe)));" _
& " Persist Security Info=True "
'
End Function
这个是连接数据库的函数
然后还有一个问题 怎么从File1.FileName 提取到文件名的文本值写入到数据库中?? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询