dbSource.Execute ("INSERT INTO #WSSTOCK SELECT itemno as Item_No,sum(qty) as Quantity FROM STOCK IN '" & Text1.Text & "' 'foxpro 2.5;' group by itemno")
解决方案 »
- 十万火急
- 求救,请问在vb中怎样用堆栈实现计算文本框中输入的一串表达式的值?
- 怎么看自己的blog?怎么用呢?
- 有关屏闭文本框控件的key_down事件,在用户。。。?
- 在vb中把层次数据保存为xml文件,并且可以显示出来
- 想在VB中输入一个矩阵 行列数均不定 但是不想用MATRIXVB插件 应该怎么编程
- IIF()的用法
- 小杨在卫华医院,小林回公司了。他们其它的同事去 《新商报》报社了。反映这件事。我是 红玉网吧 的老板。
- 在VC中编译DLL并在VB中调用的问题
- 对vb6中richtextbox内容按特定字符分割并导入数据库
- 有谁用过斑竹playyuer的DATAREPORTPLUS。DLL这个打印控件吗?请谈谈体会!
- 怎样用vb建立一个文件夹
Set "select into/bulkcopy" option off and try it .
2,"select into/bulkcopy" option off 我理解的意思是将前面的勾去掉,但如果去掉,是不允许运行select xxx into的,如果你的意思是勾上,那就会出现我说的错误。
我想我之所以插入正式表可以而插入临时表出现这个问题,可能和我连接数据库的方式有关,不知道是不是这种情况下不能直接使用临时库。如果真是,那有什么办法能将.dbf导进一个sql的临时表么?(DTS应该可以,但公司禁止编程时使用)
2.Have you read the last post written by me?I think you can use OPENROWSET method to resolve this problem.
3.Because the microsoft Foxpro driver is not supported on my computer,so I cannot use a table which created in Foxpro2.5 to test.But I use a dbase2 table and dbase 3 table to test the query,it can run properly.So I think the driver --Microsoft Visual FoxPro Driver CAN deal with Foxpro2.5 table.
Can your query run properly in Sql server query analyse tool?
dbSource.Execute ("INSERT INTO #WSSTOCK SELECT itemno as Item_No,sum(qty) as Quantity FROM STOCK IN '" & Text1.Text & "' 'foxpro 2.5;' group by itemno")
回复人: kenswind(西疯) (2001-10-18 12:02:56) 得0分
ArmorCar老兄的办法我试过,会出错:INSERT INTO语句的语法错误。有其它办法么?
回复人: ArmorCar() (2001-10-18 12:24:10) 得0分
??
Set "select into/bulkcopy" option off and try it .
回复人: kenswind(西疯) (2001-10-18 12:34:14) 得0分
仍然是错,应该不关这个设置的问题,因为是用insert into。
回复人: touhu(吐血) (2001-10-18 13:01:01) 得0分
SQL Server将 # 认为非法字符
回复人: ArmorCar() (2001-10-18 13:15:42) 得0分
I mean set "select into/bulkcopy" option off and use "select into #wsstock..."
回复人: ArmorCar() (2001-10-18 13:33:12) 得0分
I use a vfp table to test it,the following query can run on SQL. select * into #test1 from openrowset('MSDASQL','Driver=Microsoft Visual FoxPro Driver;SourceDB=C:\;SourceType=DBF','select * from 123 where no != "2086" order by w_date')
回复人: kenswind(西疯) (2001-10-18 13:38:07) 得0分
1,#并不是非法字符,它表示创建的是一个客户端的临时库。
2,"select into/bulkcopy" option off 我理解的意思是将前面的勾去掉,但如果去掉,是不允许运行select xxx into的,如果你的意思是勾上,那就会出现我说的错误。
我想我之所以插入正式表可以而插入临时表出现这个问题,可能和我连接数据库的方式有关,不知道是不是这种情况下不能直接使用临时库。如果真是,那有什么办法能将.dbf导进一个sql的临时表么?(DTS应该可以,但公司禁止编程时使用)
回复人: ArmorCar() (2001-10-18 15:09:26) 得0分
1.I think we both know what the option "off " mean.
2.Have you read the last post written by me?I think you can use OPENROWSET method to resolve this problem.
3.Because the microsoft Foxpro driver is not supported on my computer,so I cannot use a table which created in Foxpro2.5 to test.But I use a dbase2 table and dbase 3 table to test the query,it can run properly.So I think the driver --Microsoft Visual FoxPro Driver CAN deal with Foxpro2.5 table.
回复人: kenswind(西疯) (2001-10-18 15:21:28) 得0分
我试过你的办法,但很奇怪,出错,提示:incorrect syntax near 'MSDASQL'
回复人: ArmorCar() (2001-10-18 15:52:51) 得0分
????
Can your query run properly in Sql server query analyse tool?