VB Access导出数据到DB2 - VB / 基础类
我想从Access 导出数据到DB2, 比如说Access表中有3条数据,我要导入DB2,并且要删除。 但是插入3行可以成功,删除只能删除1行,并且第一行删除3遍(因为有3条数据)。 代码如下:恳请各位高手指点一二,小弟感激不尽,谢谢!
VB code:
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim sql As String
Dim I As Integer
Set db = CurrentDb
'delete the record with the reloaded key seg -> seq -> ct
sql = "select distinct ctry_cd,tax_cd,tax_type_cd from " & strDataTblName
Set rs = db.OpenRecordset(sql)
For I = 0 To rs.RecordCount - 1
'x1
sql = "delete * from " & TAX_RULE_SEG
sql = sql & " where ctry_cd='" & rs("ctry_cd") & "'"
sql = sql & " and tax_cd='" & rs("tax_cd") & "'"
sql = sql & " and tax_type_cd='" & rs("tax_type_cd") & "'"
db.Execute sql
sql = "delete * from " & TAX_RULE_SEQ
sql = sql & " where ctry_cd='" & rs("ctry_cd") & "'"
sql = sql & " and tax_cd='" & rs("tax_cd") & "'"
sql = sql & " and tax_type_cd='" & rs("tax_type_cd") &a
相关问答:
我想把word另存为xml之后,用vb读取这个xml的内容,请问如何实现?
dim f as integer
dim b() as byte
dim s as string
dim L as long
f=freefile()
open "abc.xml" for binary access read as #f
......
dim a as string,b as string,c as string
a="工程编号,单位工程名称,分部工程编号"
b="单位工程名称"
c="单位"
怎么才能判断出a字符串中存在b字符串,而不存在c字符串
看看i ......
vb WebBrowser 小问题,请教:
WebBrowser里的网址跳转后,怎么取得跳转后的页面的URL地址
顶下顶下
引用
BeforeNavigate2
好像没有这个吧 vb6.0
BeforeNavigate2
这个可以有,呵呵。
......
我连接access数据库,以前一直很好,最近却总是出错(数据库连接出错!!),代码如下:
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&db&" ......