Specifications:
Vn2Ado is a Class Library for Vulcan.NET that gives Vulca.NET developers a very fast and direct interface to data stored in OLE-Db Data sources. This class library only depends on the Vulcan.NET System Classes.
Vn2Ado connects to these OLE-DB Datasources through the traditional COM interface, and does NOT use Ado.NET. It is therefore fully compatible with Vo2Ado.
If you have an existing Visual Objects application that uses Vo2Ado, then you can use Vn2Ado after migrating your product to Vulcan.NET to run your application with minimal code changes.
Vn2Ado comes in one version that includes the full sourcecode.
The class library includes support for:
- Ado Base classes
- Ado X (DDL and Security)
An example of some Vo2Ado code to open a table and show the data on a data window:
METHOD Start CLASS MyApp LOCAL oConn AS AdoConnection LOCAL oSrv AS AdoServer LOCAL oDw AS DataWindow oConn := OpenConnection() oDw := DataWindow{SELF} oDw:QuitOnClose := TRUE oSrv := AdoServer{"Employee",oConn,AdOpenStatic, AdLockOptimistic,; adCmdTable} oDw:Use(oSrv) oDw:ViewTable() oDw:Caption := oSrv:Name oDw:Show(SHOWCENTERED) SELF:Exec() RETURN SELF FUNCTION OpenConnection AS AdoConnection LOCAL sError AS STRING LOCAL oConn AS AdoConnection LOCAL uError AS USUAL LOCAL cbErr AS CODEBLOCK cbErr := ErrorBlock({|e|_Break(e)}) BEGIN SEQUENCE oConn := AdoConnection{} oConn:ConnectionTimeout := 5 oConn:ConnectionString := "Data Source=(LOCAL);" + ; "Initial Catalog=pubs;User Id=sa;Password=;" oConn:CursorLocation := adUseClient RECOVER USING uError ErrorBox{,uError:description}:Show() GetAppObject():Quit() END BEGIN SEQUENCE oConn:Open(NIL,NIL,NIL,NIL) RECOVER USING uError END IF oConn:State <> adStateOpen // Error occurred IF oConn:Errors:Count > 0 // Ado Error sError := oConn:Errors:Item(1):description ELSEIF IsInstanceOfUSUAL(uError, #Error) sError := uError:description ELSE sError := "Unknown error" END IF ? "Error when making connection: ", sError ErrorBox{,uError:description}:Show() GetAppObject():Quit() ENDIF ErrorBlock(cbErr) RETURN oConnBack to top

