Skip to Content
author's profile photo Former Member
Former Member

Import excel to UDT by SDK

Hi all,

I am trying import excel to UDT by SDK. But I have a difficult to solve. In the UDT, it has a Time column and has been formated is hour type, I create a excel file have a Time column, too. I format Time column in the Excel is number type. In the SQL 2005, this column is formated is smallint. When I import excel to UDT by SDK, I didn't update this column to this UDT, it announces different type.

I hope people help me.

Thanks and best regards,

Canh

Edited by: phongcanhspk on Nov 3, 2008 3:47 AM

Edited by: Rui Pereira on Dec 23, 2008 3:30 PM

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Nov 03, 2008 at 04:18 AM

    Hello Canh,

    The time field of B1 is saved as samllint in MSSQL,

    the format of time is 3 or 4 digits integer (HHMM), for example:

    928 : 09:28

    1439 : 14:39

    So you need to prepare the time column as (HHMM) format, if numeric doesn't comply the format, please try string format.

    You may refer to the sales order table: ORDR.DocTime

    Kind Regards

    -Yatsea

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello YatSea,

      I tried to format this column for two instances: numeric and string but it is not successful. I create Import button to import excel to UDT. In the Import windows, Time column is correct but not update to SQL2005. In the Program, I convert string to Integer but it announces different type if this column is formated is text type. When I didn't convert string to Integer and Imported, it did not update at this column in the UDT.

      Thanks,

      Canh

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.