回复 3楼tianyake的帖子
关键代码:
sql = " if ( object_id('tempdb..##tempBillPackEdit') is not null ) drop table ##tempBillPackEdit"
sql = sql + " create table ##tempBillPackEdit (FID int identity,FEntryID int null,FGroup int,"
sql = sql + " FCTNS int null,FCTNE int null,FCTNNo varchar(20) null,FCTNQty int null,FPreCTNQty int null,FAuxQty decimal(28,8) null,"
sql = sql + " FGW decimal(28,8) null,FNW decimal(28,8) null,FCTNSize varchar(50) null,FPalletNo varchar(50),FBatchNo varchar(50)) "
oCon.Execute (sql)
m_sql = " select FBatchNo as 批号,FCTNNo as 箱号,FCTNQty as 箱数,FPreCTNQty as 每箱数量,FAuxQty as 数量,FGW as 每箱毛重,FNW as 每箱净重,FCTNSize as 包装箱尺寸,FPalletNo as 卡板号 from ##tempBillPackEdit"
Set rd = New Recordset
rd.ActiveConnection = oCon
rd.CursorLocation = adUseClient
rd.Open m_sql, oCon, adOpenKeyset, adLockOptimistic
Set fpSpread1.DataSource = rd
在箱号列输入2后
select FCTNNo+'aaa' from ##tempBillPackEdit
结果为2,(应该为2aaa) |