Announcement

Collapse
No announcement yet.

sql std startup

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • tom kroto
    replied
    thanks

    ok I did create file dsn and figured out how to use it--dump program my version now works against access2007 accdb file I had created in access. thanks for all help.

    Leave a comment:


  • Eric Pearson
    replied
    Tom --

    Please see my previous message. If you are creating a User DSN or System DSN then only registry entries are being created, not disk files. There is no file to find.

    If you create a File DSN... voila!

    -- Eric Pearson, Perfect Sync, Inc.

    Leave a comment:


  • tom kroto
    replied
    file dsn

    what you are saying is control panel>adm tools > odbc > file dsn clicked

    what i am seeing is my accessfile stated as edcinventory.accdb.mdb as iof it is using both the mdb and accdb extensions

    I will try again later no success

    where is this dsn being placed so I can look at it?

    Leave a comment:


  • Michael Mattias
    replied
    Using Windows' file explorer, start at C:\ and find "*.dsn" with "yes, search subdirectories"

    Re error messages... Get the text from SQL_Tools (I know there are functions) write 'em to a disk file; then you can copy and paste using notepad.

    Leave a comment:


  • Eric Pearson
    replied
    Tom --

    > I created dsn as user not system

    The problem is... The SQL_OpnDB syntax that you are using is telling SQL Tools to look for a File DSN, not a User DNN.

    I'd suggest creating a File DSN, because that's the easiest. Once you get it working you can convert it to a User DSN or System DSN, if you want to.

    -- Eric Pearson, Perfect Sync, Inc.

    Leave a comment:


  • tom kroto
    replied
    step by step review

    Thank you for your reply.
    I checked C:\Program Files\Common Files\ODBC\Data Sources. It is there but it is empty.
    But when I go to control panel>adm tools>odbc> I see several entries included the one I created.
    For the DS that I created - edcdsn - I added password and username.
    I reexecuted the program.
    I got the common dialog box Find DSN
    I press cancel
    I got another screen where I could select the machine data source
    I selected my data source edcdsn and was prompted for username and password which I entered.

    I could not copy and paste
    here's what it said
    49129.593 SQL open database2 1 -1 -1 999000045 #0045 0 perfect sync SQL tools user cancel
    I pressed OK
    you've asked me to show you what the DSN looks like but I have no way of finding it!
    The DSN is for access 2007- .accdb

    Leave a comment:


  • Michael Mattias
    replied
    On my system the "*.dsn" files are in:

    C:\Program Files\Common Files\ODBC\Data Sources

    But I never use that, I just use the DSN name and windows finds it. For that matter I rarely use FILEDSNs anyway.

    Let's see if there might be a CSIDL value for this folder.. nah, can't find anything even close.

    >Then I get a failure message from sql.

    The text of that message would be useful, accompanied by a posting of your DSN file.

    I don't use SQL Tools, but I know the error messages are a cut above what you get from most software.

    MCM

    Leave a comment:


  • tom kroto
    started a topic sql std startup

    sql std startup

    new sql tool user
    1. yes I created dsn and did all the other set-up
    2. I ran sample dump program successfully
    3. I altered sample dump program
    I get message in common dialog screen to select a DSN file
    but I can't find where they are stored. I push thru to find the dsn listed under machine data source but then it asks me for user id and password. Yes I created dsn as user not system. Then I get a failure message from sql. here is code less my auth code

    $DIM ALL
    $REGISTER NONE
    '$COMPILE EXE "\SQLTOOLS\SAMPLES\SQL-DUMP.EXE"

    'Remove the comment mark (') from ONE of these lines:

    $INCLUDE "\SQLTOOLS\SQLT_STD.INC"
    '$INCLUDE "\SQLTOOLS\SQLT_PRO.INC"

    DECLARE FUNCTION SQLDump AS LONG


    FUNCTION PBMAIN AS LONG
    SQL_Authorize &hxxxxxxxx
    SQL_Init
    FUNCTION = SQLDump
    SQL_Shutdown
    END FUNCTION


    FUNCTION SQLDump AS LONG

    SQL_OpenDB "C:\Documents and Settings\Owner.tomkroto\My Documents\EDCdsn.dsn" ' I assumed dsn with access database

    OPEN "c:\pbcc50\SAMPLES\sqlEDC.TXT" FOR OUTPUT AS #2

    SQL_Stmt %SQL_STMT_IMMEDIATE, "SELECT * FROM EDC001"

    DO
    SQL_Fetch %NEXT_ROW
    IF SQL_EOD THEN EXIT DO
    IF SQL_ErrorPending THEN EXIT DO
    PRINT #2,SQL_ResColText(%ALL_COLs)
    LOOP

    'Check for errors
    IF SQL_ErrorPending THEN
    SQL_MsgBox SQL_ErrorQuickAll, %MSGBOX_OK
    END IF

    SQL_MsgBox "Done.", %MSGBOX_OK

    END FUNCTION
Working...
X