[Openroad-users] A little ADO help will be highly apreciated

Kim Ginnerup kgi at bording.dk
Tue Mar 11 22:55:24 EST 2008


Hi all,

I need to take some date out of an SQL Server 2005 and put them into an Ingres database.
The existing system is experiencing severe performance problems so what else to do but moving it to Ingres. ;-)

I could use a little help on the code below.
Recordset.Recordcount() returns -1; no matter what I do
Recordset.state() returns 1


initialize()=
declare
            con = MSADO!connection default null;
            rec = MSADO!_recordset default null;
            err = MSADO!errors default null;
            sel = varchar(2000);
            res = varchar(2000);
            i = integer not null;
            cnt = integer not null;
            state = integer not null;
            connectString = varchar(2000) not null;
enddeclare
{
            curframe.trace('start');
            curframe.flush();

            con = MSADO!connection(MSADO!connection.new());
            rec = MSADO!_recordset(MSADO!_recordset.new());

            connectString =
                        'Provider=sqloledb;' +
                        'Network Library=DBMSSOCN;' +
                        'Data Source=172.16.2.40,1433;' +
                        'Initial Catalog=VIS_xxxx;' +
                        'User Id=sa;' +
                        'Password=xxxxxxx';
            con.open(connectString);
            // sel = 'SELECT TOP 10 kunde FROM dbo.KUND_Reklamation';
            sel = 'SELECT GETDATE()';
            rec = con.execute(sel,,);

            // message con.errors().item.description;
            cnt   = rec.recordcount();
            state = rec.state();
            curframe.trace(varchar(cnt) +' rows found. Recordset.state: ' + varchar(state));

            for i = 0 to cnt -1 do
                        res = rec.fields.item(i).value;
                        curframe.trace(varchar(i) +': ' + res);
            endfor;

            rec.close();
            con.close();

            rec = NULL;
            con = NULL;
}

Venligst,/Regards,

Kim Ginnerup
Technical Manager
Bording Data A/S
Bredskifte Allé 11
DK-8210  Århus V
________________________
Tlf.:             4324 5424
Direkte tlf.  4324 5370
Fax:            8624 8626
Mail: kgi at bording.dk<mailto:kgi at bording.dk>
web: http://www.bordingdata.dk/
________________________________________________________________________
Til Deres information:
Med henblik på at dokumentere kommunikationen mellem Bording Data og kunder/partnere, foretages automatisk journalisering af ind- og udgående mails på firma/kontaktperson niveau.
For Your information:
In order to ensure documentation of communication between Bording Data and our customers/partners, in- and outgoing emails are journalized at company/contact level .

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.peerlessit.com/pipermail/openroad-users/attachments/20080311/7152dca2/attachment.html 


More information about the Openroad-users mailing list