Alpha Video Training
Results 1 to 3 of 3

Thread: importing an Excle File throug a Dialog

  1. #1
    "Certified" Alphaholic mmaisterrena's Avatar
    Real Name
    Mauricio Maisterrena
    Join Date
    Nov 2006
    Location
    Torreon, Mexico
    Posts
    1,435

    Default importing an Excle File throug a Dialog

    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
    '-----------------------------------------------------------

  2. #2
    "Certified" Alphaholic mmaisterrena's Avatar
    Real Name
    Mauricio Maisterrena
    Join Date
    Nov 2006
    Location
    Torreon, Mexico
    Posts
    1,435

    Default Re: importing an Excle File throug a Dialog

    no one?

  3. #3
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,628

    Default Re: importing an Excle File throug a Dialog

    It's not practical to try to debug an import without the input file. Too many issues with the file and it's data can cause problems...
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

Similar Threads

  1. Importing csv file
    By jaryder in forum Alpha Five Version 7
    Replies: 0
    Last Post: 07-20-2006, 05:27 PM
  2. Importing CSV file
    By Colin Bannister in forum Alpha Five Version 6
    Replies: 2
    Last Post: 12-10-2004, 07:54 AM
  3. Importing File Name into Record
    By seidel1 in forum Alpha Five Version 6
    Replies: 4
    Last Post: 10-05-2004, 06:41 AM
  4. Importing Excell file
    By Buzz Burhans in forum Alpha Five Version 4
    Replies: 6
    Last Post: 02-06-2002, 01:50 AM
  5. Importing a file
    By Theron Bolen in forum Alpha Five Versions 2 and 3
    Replies: 3
    Last Post: 02-15-2001, 06:38 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •