Fixed ADO driver, it was segfaulting.

This commit is contained in:
mascarenhas 2005-03-02 19:35:54 +00:00
parent ca31714cdc
commit 963bdf37e6

View File

@ -289,7 +289,8 @@ function Private.createCursor(rs, con, closeFunc)
end
for i = 0, cursor.Fields.Count-1 do
local cond, field = pcall(cursor.Fields.Item, cursor.Fields, i)
local fields = cursor.Fields
local cond, field = pcall(fields.Item, fields, i)
if not cond then
return nil, field
end
@ -325,7 +326,8 @@ function Private.createCursor(rs, con, closeFunc)
local tb = col_names
for i = 0, cursor.Fields.Count-1 do
local cond, field = pcall(cursor.Fields.Item, cursor.Fields, i)
local fields = cursor.Fields
local cond, field = pcall(fields.Item, fields, i)
if not cond then
return nil, field
end
@ -348,7 +350,8 @@ function Private.createCursor(rs, con, closeFunc)
local tb = col_types
for i = 0, cursor.Fields.Count-1 do
local cond, field = pcall(cursor.Fields.Item, cursor.Fields, i)
local fields = cursor.Fields
local cond, field = pcall(fields.Item, fields, i)
if not cond then
return nil, field
end