Publish date: 2011-06-07

IBProvider v3.8.2. Are your data access components ready for Firebird v3?

We are continuing to actively add new functionality of Firebird 3 DBMS to IBProvider.

Let us remind you that already 2 months ago we added support of BOOLEAN data type from Firebird 3. In the new version of IBProvider Professional, we added support of PACKAGE instruction.

Now you can put in order a bulk of database procedures and functions and group them by sense into individual modules (PACKAGE). This arrangement will substantially simplify understanding and maintenance of SQL code.

Firebird 3 — PACKAGE instruction

With IBProvider, you can use the following PACKAGE capabilities in your programs:

  • Execution of DDL queries for creating, modifying and deleting PACKAGE.
  • Stored procedures call from PACKAGE in the queries «exec SP …», «{call SP …}»

VBScript example

option explicit
dim cn
set cn=createobject("ADODB.Connection")

cn.Provider="LCPI.IBProvider.3"
cn.Properties("location")="vxpsp2-fb30:e:\database\ibp_test_fb30_d3.gdb"
cn.Properties("user id")="sysdba"
cn.Properties("password")="masterkey"
cn.Properties("dbclient_library")="fbclient_30.dll"
cn.Properties("ctype")="win1251" ' This is RUSSIAN code page!
cn.Properties("auto_commit")=true
cn.Properties("exec_sp_named_param")=true

call cn.Open("")

wscript.echo "Provider Version: "&cn.Properties("Provider Version").Value
wscript.echo "DBMS Name       : "&cn.Properties("DBMS Name").Value
wscript.echo "DBMS Version    : "&cn.Properties("DBMS Version").Value

wscript.echo ""

'----------------
dim cmd
dim rs

set cmd=createobject("ADODB.Command")

cmd.ActiveConnection=cn

'----------------
wscript.echo "create packages"

cmd.CommandText = _
  "recreate package test_pack1 as"&vbCrLf& _
  "begin"&vbCrLf& _
  " procedure proc(in1 integer)"&vbCrLf& _
  " returns (out1 integer);"&vbCrLf& _
  "end;"&vbCrLf& _
  ""&vbCrLf& _
  "recreate package body test_pack1 as"&vbCrLf& _
  "begin"&vbCrLf& _
  " procedure proc(in1 integer)"&vbCrLf& _
  " returns (out1 integer)"&vbCrLf& _
  " as"&vbCrLf& _
  " begin"&vbCrLf& _
  "  out1=-in1;"&vbCrLf& _
  " end;"&vbCrLf& _
  "end;"&vbCrLf& _
  ""&vbCrLf& _
  "recreate package test_pack2 as"&vbCrLf& _
  "begin"&vbCrLf& _
  " procedure proc(in1_str varchar(64) character set ascii)"&vbCrLf& _
  " returns (out1_str varchar(64) character set ascii);"&vbCrLf& _
  "end;"&vbCrLf& _
  ""&vbCrLf& _
  "recreate package body test_pack2 as"&vbCrLf& _
  "begin"&vbCrLf& _
  " procedure proc(in1_str varchar(64) character set ascii)"&vbCrLf& _
  " returns (out1_str varchar(64) character set ascii)"&vbCrLf& _
  " as"&vbCrLf& _
  " begin"&vbCrLf& _
  "  out1_str=upper(in1_str);"&vbCrLf& _
  "  suspend;"&vbCrLf& _
  " end;"&vbCrLf& _
  "end;"&vbCrLf& _
  ""&vbCrLf& _
  "recreate procedure proc"&vbCrLf& _
  "returns (x integer)"&vbCrLf& _
  "as"&vbCrLf& _
  "begin"&vbCrLf& _
  "x=1234;"&vbCrLf& _
  "end;"

set rs=cmd.Execute()

'check errors
while(not (rs is nothing))
 set rs=rs.NextRecordset()
wend

wscript.echo ""

'----------------
wscript.echo "exec test_pack1.proc"

cmd.CommandText="exec test_pack1.proc"

cmd("in1")=2

call cmd.Execute()

wscript.echo "out1: "&cstr(cmd("out1").value)

wscript.echo ""

'----------------
wscript.echo "exec test_pack2.proc"

cmd.CommandText="exec test_pack2.proc"

cmd("in1_str")="qwerty"

set rs=cmd.Execute()

wscript.echo "out1_str: """&rs("out1_str").value&""""

wscript.echo ""

set rs=nothing

'----------------
wscript.echo "exec proc"

cmd.CommandText="exec proc"

call cmd.Parameters.Refresh()

call cmd.Execute()

wscript.echo "x: "&cstr(cmd("x").value)

wscript.echo ""

'----------------
wscript.echo "OK"

Work results:

PACKAGE instruction in Firebird 3

The new IBProvider version is faster and more stable

With each new IBProvider release, we increase the number of tests and combinations included into our test system.

In the new release, we fixed an error of the type:

BUG-CHECK at [TIBP_RW_TableStorage_Base::RowDataDpmBlock_Verification] [003]. Possible reason: Wrong DPM block [000000000490:0000] size: 1692. Wait size: 16.

The problem manifests in the rowsets, which entry size exceeds 4K, when changing intensively column values. The error is present in all IBProvider v3 bilds starting from RC5. The repair is available starting from the version 3.8.1.

In the process of IBProvider new functionality implementation, the mandatory stage is preliminary refactoring of the existing code. This time, we managed to reduce the number of service requests to server in the process of preparation of non-standard queries for the execution of stored procedures: «exec SP …», «{call SP …}»

Our short-range plans include transfer of 64bit IBProvider builds to Visual Studio 2010.

Summary

A year ago, we came to the finish line of the third IBProvider version. Then we crossed it and without a one-day stop moved further. Now, we offer you support of the whole line of Firebird and InterBase servers and the functionality we didn’t dream about even in our boldest dreams. We thank all who have stayed with us or joined us just recently.

The new IBProvider Professional 3.8.2 is READY TO WORK with Firebird 3

Are your programs ready?




In addition to the newest driver, you are GUARANTEED to receive
all subsequent versions within one year FOR FREE!


Publish date: 2011-06-07. Copyright: IBProvider. This material may be reproduced on other web sites, without written permission but link https://www.ibprovider.com/eng required.