ODBC.ew error

new topic     » topic index » view thread      » older message » newer message

Matt, I'm getting an error with the 2nd call to the routine below. A conversion
error it looks like, but I don't know how your conversion works. This is the
first time I've tried to use cursors. Previously I've done my own conversions
and used this type of readnext. Could you take a minute to look at it?

    tmp = runDirectODBC(dbId,"handler " & mysqlTableName[t] &
    							" read `primary` next")

------------------------------------ read next
-------------------------------------
global function readNextDbC(integer t, sequence selectClause)
object recDb, tmp, rtc
sequence sql


	if startCursor = True then

	    sql = "select * from " & openTbNames[t] & " " & selectClause 
	    --puts(1, sql & "\n")
	    --tmp = gets(0)
	    pickHandle = createCursor(dbId, sql)
		if pickHandle < 0 then
			odbcError(-pickHandle)
			closeDb()
			abort(1)
		end if
		recDb = moveToRecord(pickHandle, SQL_FETCH_FIRST,1)
		startCursor = False
	else
		recDb = moveToRecord(pickHandle, SQL_FETCH_NEXT,1)
	end if

    if atom(recDb) then
        recDb={"",""}
        EOF[t] = Yes
        freeHandleODBC(pickHandle)
    end if
	
    return {recDb[1]} & {recDb[2..len(recDb)]}

end function


Here's a clip of the error.

C:\EUPHORIA\INCLUDE\odbc.ew:2084 in function moveToRecord() 
number of bytes to peek is less than 0 
    hstmt = 11
    move_type = 1
    move = 1
    ok = 0
    record = {
               {32' ',49'1',32' ',32' ',32' ',49'1',48'0',48'0',32' ',49'1',
52'4',55'7',56'8',56'8',52'4',32' ',49'1'},
               1,
               100,
               14788,
               4,
               1,
               {2000,8,8},
               417.03,
               0,
               {32' ',32' ',51'3',54'6',50'2',55'7'},
               0,
               {},
               {},
               {},
               {}
             }
    cols = {
             {
               10131560,
               50'2',
               8862704,
               1,
               {32' ',49'1',32' ',32' ',32' ',49'1',48'0',48'0',32' ',49'1',
52'4',55'7',56'8',56'8',52'4',32' ',49'1'}
             },
             {10132592,50'2',9921768,7,1},
             {10133696,50'2',9921800,7,100},
             {10134800,50'2',9921784,7,14788},
             {10135904,50'2',9874208,7,4},
             {10137008,50'2',10138040,7,1},
             {

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu