List index out of bounds error
Posted: Fri 06 May 2011 14:07
My situation:
(newbie on this part)
I am building a webservices app.
My query is on a tdsServermodule.
The function builds and runs a query, returns tDataset :
function GetCustomer(CustUID : string=''; withCustom : boolean = false) : tDataSet;
the query that is run :
Select
a.RecUID
, a.UID
, a.SalesUID
, a.Created
, a.Name
, a.AccountNumber
, a.Division
, a.DivisionUID
, a.SMPSystem
, a.SMPSystemUID
, a.WarrantyExp
, a.Address1
, a.Address2
, a.City
, a.St
, a.Zip
, a.Contact
, a.Phone
, a.Fax
, a.Cell
, a.Pager
, a.Email
, a.fPhone
, a.fFax
, a.fCell
, a.fPager
, a.ContactUID
, a.Country
, a.Zone
, a.ZoneUID
, a.PhoneLbl
, a.FaxLbl
, a.CellLbl
, a.PagerLbl
, a.BillName
, a.BillAddress1
, a.BillAddress2
, a.BillCity
, a.BillZip
, a.BillContact
, a.BillPhone
, a.BillSt
, a.BillFax
, a.BillingEmail
, a.fBillPhone
, a.fBillFax
, a.BillContactUID
, a.BillCountry
, a.BillingUID
, a.BillPhoneLbl
, a.BillFaxLbl
, a.Installer
, a.InstallerUID
, a.SalesPerson
, a.SalesPersonUID
, a.BusinessType
, a.BusinessTypeUID
, a.TaxID
, a.TaxGroup
, a.TaxGroupUID
, a.Terms
, a.TermUID
, a.DateMoved
, a.PONumRequired
, a.URL
, a.LDCarrier
, a.LDCarrierUID
, a.Tech1
, a.Tech1UID
, a.Tech2
, a.Tech2UID
, a.CreditCardType
, a.CCTypeUID
, a.CreditCardName
, a.Comments
, a.Current30
, a.Net30
, a.Net60
, a.Net90
, a.YTD
, a.Balance
, a.Status
, a.DepositOnAccount
, a.LastService
, a.UseCustRates
, a.TripCharge
, a.LaborRate
, a.CreditLimit
, a.MaintCost
, a.MaintExp
, a.Premium
, a.MatTaxRate
, a.LaborTaxRate
, a.OrderTaxRate
, a.ServiceTaxRate
, a.ExciseTaxRate
, a.FinanceCharge
, a.MatPriceLvl
, a.MailName
, a.MailAddress1
, a.MailAddress2
, a.MailCity
, a.MailSt
, a.MailZip
, a.MailContact
, a.MailPhone
, a.MailingEmail
, a.fMailPhone
, a.MailContactUID
, a.MailCountry
, a.MailPhoneLbl
, a.MailAddInvoice
, a.MailAddLabel
, a.LastAction
, a.IsActive
, a.MsgMaint
, a.MsgWarr
, a.MsgPastDue
, a.IsBillable
, a.CustID
, a.QBModified
, a.IAccountID
, a.IAccountName
, a.PAccountID
, a.PAccountName
, a.DAccountID
, a.DAccountName
, a.ParentID
, a.QBTaxID
, a.QBExport
, a.FullName
, a.MinService
, a.MinHours
, a.MinServiceUID
, a.ServiceMsg
, a.MinHoursUID
, a.HoursMsg
, a.AddExciseTax
, a.QBNonTaxed
, a.ClassID
, a.ClassUID
, a.Class
, a.PriceBookUID
, a.PriceBook
, a.LocationUID
, a.Location
, a.ConvertDate
, a.DocDir
, a.CertCodeUID
, a.CertCode
, a.HasLead
, a.FormCode
, a.WhoEdit
, a.EditDateTime
, a.EditCount
, a.EditModule
, a.LocationID
, a.EditUID
From Cust a
Where a.UID = 'CM022610154188244058'
The issue:
if I use a tUniQuery, I get a list index out of bounds (158) error sometime after the end of the function.
If I use a tSQLQuery, I have no issues.
Any ideas where to start looking?
(btw, I am using the trial version of unidac and Delphi XE Enterprise, with a MSSQL database)
(newbie on this part)
I am building a webservices app.
My query is on a tdsServermodule.
The function builds and runs a query, returns tDataset :
function GetCustomer(CustUID : string=''; withCustom : boolean = false) : tDataSet;
the query that is run :
Select
a.RecUID
, a.UID
, a.SalesUID
, a.Created
, a.Name
, a.AccountNumber
, a.Division
, a.DivisionUID
, a.SMPSystem
, a.SMPSystemUID
, a.WarrantyExp
, a.Address1
, a.Address2
, a.City
, a.St
, a.Zip
, a.Contact
, a.Phone
, a.Fax
, a.Cell
, a.Pager
, a.Email
, a.fPhone
, a.fFax
, a.fCell
, a.fPager
, a.ContactUID
, a.Country
, a.Zone
, a.ZoneUID
, a.PhoneLbl
, a.FaxLbl
, a.CellLbl
, a.PagerLbl
, a.BillName
, a.BillAddress1
, a.BillAddress2
, a.BillCity
, a.BillZip
, a.BillContact
, a.BillPhone
, a.BillSt
, a.BillFax
, a.BillingEmail
, a.fBillPhone
, a.fBillFax
, a.BillContactUID
, a.BillCountry
, a.BillingUID
, a.BillPhoneLbl
, a.BillFaxLbl
, a.Installer
, a.InstallerUID
, a.SalesPerson
, a.SalesPersonUID
, a.BusinessType
, a.BusinessTypeUID
, a.TaxID
, a.TaxGroup
, a.TaxGroupUID
, a.Terms
, a.TermUID
, a.DateMoved
, a.PONumRequired
, a.URL
, a.LDCarrier
, a.LDCarrierUID
, a.Tech1
, a.Tech1UID
, a.Tech2
, a.Tech2UID
, a.CreditCardType
, a.CCTypeUID
, a.CreditCardName
, a.Comments
, a.Current30
, a.Net30
, a.Net60
, a.Net90
, a.YTD
, a.Balance
, a.Status
, a.DepositOnAccount
, a.LastService
, a.UseCustRates
, a.TripCharge
, a.LaborRate
, a.CreditLimit
, a.MaintCost
, a.MaintExp
, a.Premium
, a.MatTaxRate
, a.LaborTaxRate
, a.OrderTaxRate
, a.ServiceTaxRate
, a.ExciseTaxRate
, a.FinanceCharge
, a.MatPriceLvl
, a.MailName
, a.MailAddress1
, a.MailAddress2
, a.MailCity
, a.MailSt
, a.MailZip
, a.MailContact
, a.MailPhone
, a.MailingEmail
, a.fMailPhone
, a.MailContactUID
, a.MailCountry
, a.MailPhoneLbl
, a.MailAddInvoice
, a.MailAddLabel
, a.LastAction
, a.IsActive
, a.MsgMaint
, a.MsgWarr
, a.MsgPastDue
, a.IsBillable
, a.CustID
, a.QBModified
, a.IAccountID
, a.IAccountName
, a.PAccountID
, a.PAccountName
, a.DAccountID
, a.DAccountName
, a.ParentID
, a.QBTaxID
, a.QBExport
, a.FullName
, a.MinService
, a.MinHours
, a.MinServiceUID
, a.ServiceMsg
, a.MinHoursUID
, a.HoursMsg
, a.AddExciseTax
, a.QBNonTaxed
, a.ClassID
, a.ClassUID
, a.Class
, a.PriceBookUID
, a.PriceBook
, a.LocationUID
, a.Location
, a.ConvertDate
, a.DocDir
, a.CertCodeUID
, a.CertCode
, a.HasLead
, a.FormCode
, a.WhoEdit
, a.EditDateTime
, a.EditCount
, a.EditModule
, a.LocationID
, a.EditUID
From Cust a
Where a.UID = 'CM022610154188244058'
The issue:
if I use a tUniQuery, I get a list index out of bounds (158) error sometime after the end of the function.
If I use a tSQLQuery, I have no issues.
Any ideas where to start looking?
(btw, I am using the trial version of unidac and Delphi XE Enterprise, with a MSSQL database)