Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: ODBC error connecting to Perforce

  1. #1

    Default ODBC error connecting to Perforce

    I have an ODBC data source configured for Perforce, which uses the 'Perforce ODBC Driver'.

    The data source works in MS Query Analyser and Access but when I try to use a DB Query node I get the error: "Unable to translate ODBC type: -9" (it's finding the data source because I get a different error if I use an invalid data source name).

    So do I need to do something to tell LAE about the Perforce ODBC Driver eg copy the dll somewhere?

  2. #2
    Lavastorm Employee stonysmith's Avatar
    Join Date
    Nov 2006
    Location
    Grapevine Tx
    Posts
    799

    Default

    First, try a simple query such as
    SELECT * FROM tablename

    If this works, then your connection the database is correct.

    I believe that the error you are getting is due to an invalid data type on a specific column.

    What type SQL statement are you trying to execute? Are you running a SELECT, UPDATE or an INSERT?

  3. #3

    Default

    Hi, that's what I was doing, just a simple test select statement, but it looks to me like it can't find the Perforce database driver?

  4. #4

    Default

    Ooo, interesting, I tried a few different queries to try to exclude weird datatypes.
    The 'counters' table has only 2 columns, both text:
    select * from counters;
    and
    select counter from counters;
    returned the same error but
    select 1 from counters;
    and
    select ''+counter from counters;
    returned successful results.

    Selecting a 'date' type column works but columns MS Access interprets as 'text' and 'memo' seem to need forcing to a string for LAE to handle them.

    Any ideas what I can do about this other than explicitly selecting and casting every text column?

  5. #5

    Default

    Further to above, number fields can be selected without error too.
    However, I've spotted that LAE loses the time portion of datetime fields (treats them as dates).

    At least it's probably usable for my purposes, for now at least, but any advice to make LAE handle the Perforce data types better would be appreciated, thanks.

    Here's a link to the Perforce DB schema; the tables I need to connect to are changes, fixes and jobs:
    http://www.perforce.com/perforce/doc...aa_schema.html

  6. #6
    Lavastorm Employee stonysmith's Avatar
    Join Date
    Nov 2006
    Location
    Grapevine Tx
    Posts
    799

    Default

    Losing the time portion of the field is a known issue.. it's mentioned in the release notes for v4.1.4. It was done (for now) to maintain backward compatibility.

    [QUOTE=j thomas;1085]However, I've spotted that LAE loses the time portion of datetime fields (treats them as dates).
    QUOTE]

  7. #7

    Default

    I've managed to work around the time problem by retrieving the field as a string then converting it to a timestamp.

    The problem I can't work around is that I can't retrieve LONGVARCHAR fields - I've tried
    select str(description) from changes;
    but I get the error "unable to free statement handle".
    If I try
    select ''+description from changes;
    the query executes but nulls are returned (but I know there's data in there).

    Any ideas?

  8. #8

    Default

    Is it a known issue that LONGVARCHAR fields can't be retrieved via ODBC?
    Is there a fix/workaround?

  9. #9

    Default Cannot retrieve values for LONGVARCHAR fields

    I cannot retrieve data from Perforce that is of type LONGVARCHAR. Among other things this means I cannot retrieve the change description which would be a useful field to have access to.

    I've tried casting to various types but nothing has worked so far and I'm out of ideas.

    1) Is this a bug?
    2) Is there a workaround?
    3) Is it related to http://community.mda-data.com/showthread.php?t=187 which is scheduled to be fixed in 5.0?

    Thanks in advance for any replies.

  10. #10
    Contributor
    Join Date
    Jan 2007
    Location
    Boston
    Posts
    134

    Default

    J_thomas, Are you still having problems with the longvarchar in perforce? If so I would recommend you contac DesktopSupport@MDA-DATA.com, to get in touch with the support group. RegardsTimon KoufopoulosMDA Support.

Similar Threads

  1. Connecting to MySQL
    By j thomas in forum Data Acquisition
    Replies: 4
    Last Post: 08-31-2011, 02:11 PM
  2. JDBC-ODBC bridge - advice needed
    By j thomas in forum Data Acquisition
    Replies: 5
    Last Post: 08-26-2011, 06:31 PM
  3. Connecting to SQL Server
    By ryanherb in forum Data Acquisition
    Replies: 4
    Last Post: 04-22-2010, 09:26 PM

Posting Permissions

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