L
lps
Unregistered / Unconfirmed
GUEST, unregistred user!
测试存储过程如下 <br>PROCEDURE GETSTRU <br>LPARAMETERS fname <br> USE &fname <br> COPY STRUCTURE EXTENDED TO &fname.stru <br> USE <br>ENDPROC <br>在delphi中使用OLEDB方式连接数据库,用到了一个TADOConnection和一个TADOStoredProc,连接上以后,在Delphi中能列举出getstru这样的过程名,但是添加参数不能列举,如果手工添加(不论是设计时还是运行时)则在运行时产生一个OLE异常:features is not available <br>也试过使用adocommand等方法,结果都是一样的![!]<br><br><br>同样的方法如果使用sql server 2000则可以直接列举出参数,因此估计是ADO或者VFP方面的问题,至于问题在哪就要请教诸位了,我的测试库就只有上面一个存储过程,并无其他东西<br><br>测试VFP9.0自带的Northwind数据库也是一样的啊,打开Northwind数据库看了一下,和我的也没什么区别,另外,注意到VFP9.0 SP2文档中说明是可以传参数的,原文如下: <br>Stored Procedures in the OLE DB Provider <br>The Visual FoxPro OLE DB Provider accepts stored procedure commands in the following formats: <br><br>Calling a stored procedure using the conventional syntax: <br><br>myStoredProc( Param1, Param2, ... ) <br> <br><br>Calling a stored procedure using the SQL EXEC keyword with the following syntax: <br><br>EXEC myStoredProc( Param1, Param2, ... ) <br> <br><br>where each parameter is in the format expected for its data type or is a valid expression that returns that format as in the following example: <br><br>EXEC myStoredProc( 'characterparm', {^2002/09/09}, dateTime(), 100, 99.99, .T.) <br> <br>Note <br>Be sure to replace myStoredProc with the name of the stored procedure you want. <br> <br>Tip <br>When you are using ADO or ADO.NET and setting the Command Type to Stored Procedure, you do not need to include the EXEC keyword. If the Command Type is not set to Stored Procedure, you must use the conventional syntaxfor stored procedures or use the EXEC keyword. <br> <br><br><br>Registry Entries <br>When you install the Visual FoxPro OLE DB Provider, the installation program updates your system registry, HKEY CLASSES_ROOT, and adds the following new keys: <br><br>HKEY_CLASSES_ROOT/VFPOLEDB <br><br>HKEY_CLASSES_ROOT/VFPOLEDB.1 <br><br>HKEY_CLASSES_ROOT/Vfpoledb.ConnectionPage <br><br>HKEY_CLASSES_ROOT/Vfpoledb.ConnectionPage.1 <br><br>HKEY_CLASSES_ROOT/VFPOLEDB.ErrorLookup <br><br>HKEY_CLASSES_ROOT/VFPOLEDB.ErrorLookup.1 <br><br>International Support <br>The Visual FoxPro OLE DB Provider provides international language support for the following: <br><br>Double-byte character sets (DBCS) <br><br>Multiple collating sequences <br><br>A collating sequence defines the sort order for data stored in a Visual FoxPro table or database. The Visual FoxPro OLE DB Provider is configured to use collating sequences that support the language version of your operating system by default. <br><br>有一个好人翻译的如下: <br>OLE DB 提供程序 中的存储过程 <br>Visual FoxPro OLE DB 提供程序接受下列格式的存储过程命令: <br><br>使用常规语法调用存储过程: <br>myStoredProc( Param1, Param2, ... ) <br> <br><br>使用带有下列语法的 SQL EXEC 关键字调用存储过程: <br>EXEC myStoredProc( Param1, Param2, ... ) <br> <br>这里的每个参数是象下列示例中数据类型所期望的格式或是返回该格式的有效表达式: <br>EXEC myStoredProc( 'characterparm', {^2002/09/09}, dateTime(), 100, 99.99, .T.) <br> <br>注意: <br>确定使用想要的存储过程名替换了 myStoredProc。 <br> <br>提示: <br>当使用 ADO 或 ADO.NET 并设置命令类型(Command Type)为存储过程(Stored Procedure)时,不需要包含 EXEC 关键字。如果命令类型(Command Type)没设置为存储过程(Stored Procedure),必须使用存储过程的常规语法或使用 EXEC 关键字。 <br> <br><br><br>注册项目 <br>当安装 Visual FoxPro OLE DB 提供程序时,安装程序更新系统注册表 HKEY CLASSES_ROOT 并添加下列新键: <br><br>HKEY_CLASSES_ROOT/VFPOLEDB <br><br>HKEY_CLASSES_ROOT/VFPOLEDB.1 <br><br>HKEY_CLASSES_ROOT/Vfpoledb.ConnectionPage <br><br>HKEY_CLASSES_ROOT/Vfpoledb.ConnectionPage.1 <br><br>HKEY_CLASSES_ROOT/VFPOLEDB.ErrorLookup <br><br>HKEY_CLASSES_ROOT/VFPOLEDB.ErrorLookup.1 <br><br>国际化支持 <br>Visual FoxPro OLE DB 提供程序提供下列国际化语言支持: <br><br>双字节字符集(DBCS) <br><br>多重排序序列 <br>排序序列定义了存储在 Visual FoxPro 表或数据库中数据的排列顺序。Visual FoxPro OLE DB 提供程序被默认设置为使用操作系统语言版本所支持的排序序列。