VB里执行SQL语句,并显示结果
SQL里的查询语句为
SELECT RdRecord.cBusType AS 类型, RdRecord.dDate AS 日期, RdRecord.cCode AS 单据编码, RdRecords.cInvCode AS 存货编码, Inventory.cInvName, RdRecords.iQuantity AS 数量, RdRecords.iUnitCost AS 单价, RdRecords.iPrice AS 金额FROM RdRecord INNER JOIN RdRecords ON RdRecord.ID = RdRecords.ID LEFT OUTER JOIN Inventory ON RdRecords.cInvCode = Inventory.cInvCodeWHERE (RdRecord.cBusType = '普通采购') AND (RdRecord.cCode = '2011060434')
Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=UFDATA_002_2011;Data Source=192.168.1.6;Connect Timeout=30