Cannot read data from server easily?

Discussion in 'ASP General' started by jodleren, Jul 7, 2010.

  1. jodleren

    jodleren Guest

    Hi

    I use ASP, SQL server with a EdgaCam database (that is a CNC tool)

    when I read data, I need to read out the fields in the right order,
    otherwise they are empty, such as:

    rsJob.open="select job.[description],job.[comment],job.[sequence],
    job.[nc file], job.[revision],ListJobStatus.[job status],ListJobStatus.
    [color], job.[history], job.[Location], job.[programmer] from job LEFT
    JOIN ListJobStatus ON job.[list job status]=ListJobStatus.ID where job.
    [cam file] like '"+request("part")+"' order by 1"
    field0=rsjob.fields(0).value
    field1=rsjob.fields(1).value
    field2=rsjob.fields(2).value
    field3=rsjob.fields(3).value
    field4=rsjob.fields(4).value
    field5=rsjob.fields(5).value
    field6=rsjob.fields(6).value
    field7=rsjob.fields(7).value
    field8=rsjob.fields(8).value
    field9=rsjob.fields(9).value


    reading out field 1 before 0 will cause 0 to be empty

    next, when I use movefirst, it seems like some data gets lost...

    what can cuase this?
    jodleren, Jul 7, 2010
    #1
    1. Advertising

  2. jodleren

    Bob Barrows Guest

    jodleren wrote:
    > Hi
    >
    > I use ASP, SQL server with a EdgaCam database (that is a CNC tool)
    >
    > when I read data, I need to read out the fields in the right order,
    > otherwise they are empty, such as:
    >
    > reading out field 1 before 0 will cause 0 to be empty
    >
    > next, when I use movefirst, it seems like some data gets lost...
    >
    > what can cuase this?

    You're probably using an obsolete ODBC driver which has the bug you
    describe when dealing with columns with TEXT (SQL Server) or Memo (Jet)
    datatypes. My recommendation would be to switch to a native OLE DB
    provider:

    http://www.aspfaq.com/show.asp?id=2126

    If that is not possible for some reason, then you need to rewrite the
    sql statement used to retrieve the data and put the TEXT column last in
    the SELECT list. See:
    http://databases.aspfaq.com/databas...memo-text-hyperlink-and-currency-columns.html


    --
    HTH,
    Bob Barrows
    Bob Barrows, Jul 7, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex Hunsley
    Replies:
    7
    Views:
    3,554
    Alex Hunsley
    Aug 25, 2004
  2. aspineux
    Replies:
    0
    Views:
    217
    aspineux
    Aug 28, 2011
  3. aspineux
    Replies:
    0
    Views:
    232
    aspineux
    Sep 16, 2011
  4. Hawre

    How to easily write data access codes?

    Hawre, May 19, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    124
    Eliyahu Goldin
    May 19, 2005
  5. Ted Byers
    Replies:
    23
    Views:
    412
    Peter J. Holzer
    Nov 15, 2008
Loading...

Share This Page