VB6中连接oracle 数据库 怎么往指定的表中添加数据
VB6:
Dim sqlstr As String
Dim conn As New ADODB.Connection '用于连接ORACLE数据源的连接
Dim myrs As New ADODB.Recordset '用于连接ORACLE数据库的记录集
Set conn = New ADODB.Connection
Dim i As Integer
conn.ConnectionString = "Provider=MSDAORA.1;Password=aaa;User ID=aaa ;Data Source=ORCL;Persist Security Info=true"
conn.Open
sqlstr = "Select * From rygl_card"
Set myrs = conn.Execute(sqlstr)
Do While Not myrs.EOF
For i = 0 To myrs.Fields.Count - 1
MsgBox i
'MsgBox txtLicense.Text & myrs.Fields(i) '输出表中各字段
Next i
myrs.MoveNext
Loop
我连接上oracle数据库 ,能从指定表中提取数据。
现在我想往指定的表中插入数据该怎么写VB代码
例如:kqgl表 3个字段: id(varchar2(50)),peopleno(varchar2(50)),status(char(1))
我怎么往kqgl表中添加数据
[解决办法]
conn.Execute("insert into utable.....")
[解决办法]
恭喜楼主................