in reply to Re: SQL err in WIN32
in thread SQL err in WIN32

Hi, I did a cut and paste of your code into the program, and while it will now fall through, I still get this error. error submitting SQL statment 1 1 "-1305"
If your getting a message rather than -1305, then I still have a problem, probably with my setup. If your getting -1305 then I don't feel so bad, but still suspect I'm missing the error file, or still not accessing it properly.

I've not yet written the get data part, what's there is mostly from the win32::odbc fact, as I wanted to make sure I was accessing the file, before I got heavy into code, but thanks for the offer. I'll certainly come back if I get stuck. Thanks ever so much for taking your time to help out.

Replies are listed 'Best First'.
Re^3: SQL err in WIN32
by WhiteBird (Hermit) on Jul 31, 2004 at 15:27 UTC
    I'm glad to see that EdwardG nailed the problem for you. I wasn't pulling any errors at all, but I didn't have a space in my table name. I avoid spaces in names at all costs. Just out of curiosity I renamed my table with a space in the name and I pulled up the 1305 error. In detail it reads:

    error submitting SQL statment [-1305] [1] [0] "[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot find the input table or query 'CODE'. Make sure it exists and that its name is spelled correctly."

    Which points directly to my table which is named "CODE CODE". Just FYI for future reference.

      Hi,My problem is I'm not getting any of the Microsoft message, just the numbers. If you've an opportunity, could you check the versions you have of the DB packages, aginst what I posted, I still think I may not have everything I need, or their not current. Or maybe I installed in an improper sequence. I'm getting errors now when I try to read the data using
      while ($db->FetchRow() ) { @Data= $db->Data( 1 ); }
      which should just get the first column, but I get this error sequence for every record.
      Use of uninitialized value in array element at C:/Perl/lib/Win32/ODBC.pm line 257.
      Use of uninitialized value in substitution (s///) at C:/Perl/lib/Win32/ODBC.pm line 256.
      Use of uninitialized value in substitution (s///) at C:/Perl/lib/Win32/ODBC.pm line 256.
      Use of uninitialized value in substitution (s///) at C:/Perl/lib/Win32/ODBC.pm line 256.
      Use of uninitialized value in substitution (s///) at C:/Perl/lib/Win32/ODBC.pm line 256.
      Use of uninitialized value in concatenation (.) or string at C:\Alpine\Laia_2.pl line 51.
      Line 51 being Fetchrow. Of course there maybe a problem with the data base, but everything is supposed to be stright text. Also tried using examples found at http://www.roth.net/perl/odbc/docs/ODBC_Docs.htm# for Data and Datahash, but keep getting similar errors. Of course some of those column names are names with spaces in them, so that might be yet another problem. And I thought this would be easier than figuring out visual basic. Thanks again for your time and help.
        I'm running an older version of ActiveState Perl on W2K, version 5.6.1.
        My DBD::ODBC is 1.05 and DBI is 1.37.

        You probably don't want to drop back to an older version.

        I've seen the concatenation error before when I've had troublesome data in a database--but that doesn't necessarily mean that you're having the same problem. Are you able to directly view the data you're trying to pull?