|
看错了,不好意思
Sub main
Dim connection As Long
Dim retcode As long
Dim outputStr as String
Dim query as String
Dim result as integer
Result = SQAGetProperty("Type=Label;ObjectIndex=1","Text",myString)
connection = SQLOpen("DSN=Test",outputStr,prompt:=3)
query = "insert into table(row) values(mystring)"
retcode = SQLExecQuery(connection,query)
retcode = SQLClose(connection)
End Sub
DNS在控制面板管理工具DataSource里配制
我把你说的判断插入数据是否存在理解为不让插入重复的,那么你只用在access里对列做主健或无重复索引设置。在脚本写数据的地方加上判断,就可以了。具体怎么做,方法很多。
如果要在脚本里做,在插入数据前去比照数据表的数据判断,用循环,感觉效率太低,没什么必要
[ Last edited by ilovejolly on 2005-9-1 at 11:27 ] |
|