I want to import an Excel file to a table usian a Dialog After validate event but some times works fine some times it makes Alpha to stop responding and somtimes an Error ocurs saying something like "data underflow".
Can sombody tell me why, (its an 8 MB ecxel spreadsheet) this is the code of the after validate event.
------------------------------------------
if CurrentForm.Controls.REQ= "actualizar"
dim connectionString as c
connectionString = "::Name::Financiero_Requisitado"
delete options
dim options as p
options.ConsolidateArguments= .t.
options.AddTablesToDatabase= .t.
options.ShowProgress= .t.
options.AllowCancel= .t.
delete a_import
dim a_import[0] as p
a_import[].ObjectName = "GASTADO$"
a_import[..].SQLSelectStatement = "SELECT * from [GASTADO$]"
a_import[..].SQLType = "Portable"
a_import[..].Arguments = ""
a_import[..].ImportType = "Create table"
a_import[..].LocalTableName = a5.get_path() + chr(92) + "tbl_proyectos_requsitado"+".dbf"
a_import[..].LocalTableFieldDef = <<%txt%
<SizeToFit=.T.>
<ConvertTimeToDate=.T.>
<DefineFieldOverrides=.F.>
<OverrideDefinitions="">
%txt%
a_import[..].OverwriteOption = "Overwrite without prompting"
dim flagSilent as l
flagSilent = .t.
delete p
dim p as p
p = a5_AlphaDAO_Import(connectionString,a_import,options,flagSilent)
end if
'-----------------------------------------------------------
Can sombody tell me why, (its an 8 MB ecxel spreadsheet) this is the code of the after validate event.
------------------------------------------
if CurrentForm.Controls.REQ= "actualizar"
dim connectionString as c
connectionString = "::Name::Financiero_Requisitado"
delete options
dim options as p
options.ConsolidateArguments= .t.
options.AddTablesToDatabase= .t.
options.ShowProgress= .t.
options.AllowCancel= .t.
delete a_import
dim a_import[0] as p
a_import[].ObjectName = "GASTADO$"
a_import[..].SQLSelectStatement = "SELECT * from [GASTADO$]"
a_import[..].SQLType = "Portable"
a_import[..].Arguments = ""
a_import[..].ImportType = "Create table"
a_import[..].LocalTableName = a5.get_path() + chr(92) + "tbl_proyectos_requsitado"+".dbf"
a_import[..].LocalTableFieldDef = <<%txt%
<SizeToFit=.T.>
<ConvertTimeToDate=.T.>
<DefineFieldOverrides=.F.>
<OverrideDefinitions="">
%txt%
a_import[..].OverwriteOption = "Overwrite without prompting"
dim flagSilent as l
flagSilent = .t.
delete p
dim p as p
p = a5_AlphaDAO_Import(connectionString,a_import,options,flagSilent)
end if
'-----------------------------------------------------------
Comment