I would like to connect to an Oracle database via ODBC, using VPN. I used
DBConnection>>open, and after choosing the DSN name and entering my password, I got a walkback 'Index 434 is out of bounds'. This error occurs in the last line of DBConnection>>open, where it says self connectString: (connSz copyFrom: 1 to: lenConnSz value) and here lenConnSz value is 434. Any idea why lenConnSz value is 434, and why it's apparently too big? Thanks. |
"Ted Shen" <[hidden email]> wrote in message
news:1065455947.326670@rh9cache... > I would like to connect to an Oracle database via ODBC, using VPN. I used > DBConnection>>open, and after choosing the DSN name and entering my > password, I got a walkback 'Index 434 is out of bounds'. This error occurs > in the last line of DBConnection>>open, where it says > > self connectString: (connSz copyFrom: 1 to: lenConnSz value) > > and here lenConnSz value is 434. > > Any idea why lenConnSz value is 434, and why it's apparently too big? Working with Oracle in Dolphin is "fun", but just Oracle on its own is so much "fun". I just increased the size of the connection string buffer. I also had to add code to strip nulls as well. You can see my DBConnection<<open method bellow. You can do a http://groups.google.com search restricted to this group with Oracle as a search term to find some other Oracle issues. ================== open "Open the receiver after prompting for the connection details, but only if not already connected." "cdemers - 7/16/2003 Increased conSz size to 500 from 256." handle isNull ifTrue: [| connSz lenConnSz | [| ret | connSz := String new: 500"256". lenConnSz := SWORD new. ret := ODBCLibrary default sqlDriverConnect: self getHandle windowHandle: UserLibrary default getActiveWindow inConnectionString: self connectString stringLength1: SQL_NTS outConnectionString: connSz bufferLength: connSz size stringLength2Ptr: lenConnSz driverCompletion: (self useDriverCompletion ifTrue: [SQL_DRIVER_COMPLETE] ifFalse: [SQL_DRIVER_NOPROMPT]). self dbCheckException: ret] ifCurtailed: [self free]. self connectString: (connSz copyFrom: 1 to: lenConnSz value) trimNulls "cdemers - 8/4/2003 Added"] ================== Chris |
Thanks, Chris. This is working well.
Ted "Christopher J. Demers" <[hidden email]> wrote in message news:blsj37$fio80$[hidden email]... > "Ted Shen" <[hidden email]> wrote in message > news:1065455947.326670@rh9cache... > > I would like to connect to an Oracle database via ODBC, using VPN. I used > > DBConnection>>open, and after choosing the DSN name and entering my > > password, I got a walkback 'Index 434 is out of bounds'. This error > occurs > > in the last line of DBConnection>>open, where it says > > > > self connectString: (connSz copyFrom: 1 to: lenConnSz value) > > > > and here lenConnSz value is 434. > > > > Any idea why lenConnSz value is 434, and why it's apparently too big? > > Working with Oracle in Dolphin is "fun", but just Oracle on its own is so > much "fun". I just increased the size of the connection string buffer. I > also had to add code to strip nulls as well. You can see my > DBConnection<<open method bellow. You can do a http://groups.google.com > search restricted to this group with Oracle as a search term to find some > other Oracle issues. > > ================== > open > "Open the receiver after prompting for the connection details, but only > if not already connected." > "cdemers - 7/16/2003 Increased conSz size to 500 from 256." > handle isNull > ifTrue: > [| connSz lenConnSz | > [| ret | > connSz := String new: 500"256". > lenConnSz := SWORD new. > ret := ODBCLibrary default > sqlDriverConnect: self getHandle > windowHandle: UserLibrary default getActiveWindow > inConnectionString: self connectString > stringLength1: SQL_NTS > outConnectionString: connSz > bufferLength: connSz size > stringLength2Ptr: lenConnSz > driverCompletion: (self useDriverCompletion > ifTrue: [SQL_DRIVER_COMPLETE] > ifFalse: [SQL_DRIVER_NOPROMPT]). > self dbCheckException: ret] > ifCurtailed: [self free]. > self connectString: (connSz copyFrom: 1 to: lenConnSz value) trimNulls > "cdemers - 8/4/2003 Added"] > ================== > > Chris > > |
Free forum by Nabble | Edit this page |