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
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
Comment