|
data base unlimited data base unlimited |
||||||||||
|
||||||||||
|
Home Up SQL ADO Access Visual Basic. NET ASP.NET Exchange Server
|
Visual BasicDBU VB codeOur ADO area has samples of ADO code that can be used in Visual Basic. This area concentrates on the VB Data Environment Designer and how to use it. AnomaliesWe have found some anomalies in using the Visual Basic 6 Data Environment against SQL Server 7, using the SQL OLEDB driver. We have not yet tested this using the OLEDB ODBC driver instead. A recordset returning stored procedure can be done as: if <Data Environment>.<rsCommand
Name>.State <> adStateOpen then or set GridEx1.ADOrecordset = at the end, make sure to close the recordset: <Data Environment>.<rsCommand Name>.Close However: a non-recordset returning query (action query) does not seem to handle properly through the <Data Environment>.<Command Name> method. Instead, use the <Data Environment>.<Connection> object: sql = "exec <stored proc name> " ' leave out optional parameters 4 to 9 If <Data
Environment>.<connection>.State <> adStateOpen
Then The alternative would require all arguments despite the fact that they are declared as optional in the SQL stored procedure and optional in the command properties under the Data Environment! <Data Environment>.<Command Name> param1, param2, param3, param4, param5, param6, param7, param8, param9 ' Copyright DBU 2000.
|
Location Map
Updates
|
||||||||