bb.donnay-software.com

Donnay Software Web Forums
It is currently Wed Jun 03, 2020 5:48 am

All times are UTC - 7 hours




Post new topic Reply to topic  [ 15 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Wed Jul 31, 2019 5:20 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4125
Location: Boise, Idaho USA
I have created an installation program that installs Sqlquery and Xdot on any computer and does not require any installation of either Xbase++ or eXpress++. It creates an installation folder that includes all the necessary run time files.

This can be very handy because both programs (SqlQuery.Exe and Xdot.Exe) will always run regardless of the version of eXpress++ and/or Xbase++ you have installed or even if you don't have either of them installed.

The programs are built from the latest build of SqlQuery and from build 267 of eXpress++ (to be released soon).

http://bb.donnay-software.com/sqlquery/sqlquery20.exe

_________________
The eXpress train is coming - and it has more cars.


Top
 Profile  
 
PostPosted: Wed Jul 31, 2019 9:54 pm 
Offline
User avatar

Joined: Wed Feb 24, 2010 3:44 pm
Posts: 1185
hi,

will it work with PostgreSQL ODBC Driver found here :?:
https://www.postgresql.org/ftp/odbc/versions/msi/

i guess 32 Bit ODBC Version is need, or :?:

---

got it working :dance:
WOW that GREAT :clap:

Attachment:
PG_ODBC.JPG
PG_ODBC.JPG [ 215.85 KiB | Viewed 3756 times ]

_________________
greetings by OHR
Jimmy


Top
 Profile  
 
PostPosted: Thu Aug 01, 2019 5:25 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4125
Location: Boise, Idaho USA
I have tested it with the Devart PostGreSql ODBC driver but had some problems with other drivers.

This is not any problem with SqlQuery, but is a problem with the ODBCDBE.

Which PostGreSql driver are you using and which version of PostGreSql Server are you using?

_________________
The eXpress train is coming - and it has more cars.


Top
 Profile  
 
PostPosted: Thu Aug 01, 2019 1:09 pm 
Offline
User avatar

Joined: Wed Feb 24, 2010 3:44 pm
Posts: 1185
hi,

rdonnay wrote:
I have tested it with the Devart PostGreSql ODBC driver but had some problems with
Which PostGreSql driver are you using and which version of PostGreSql Server are you using?


i use PostgreSQL v9.5 with PgAdmin3 (as EXE) while since v9.6 PgAdmin4 is a Web App.

ODBC Driver (psqlodbc_09_05_0400-x86.zip -> psqlodbc_09_05_0400-x86.zip) are from this Website
https://www.postgresql.org/ftp/odbc/versions/msi/

_________________
greetings by OHR
Jimmy


Top
 Profile  
 
PostPosted: Thu Aug 01, 2019 2:10 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4125
Location: Boise, Idaho USA
Your screen shot shows that you are using the PGDBE and not the ODBCDBE, therefore your ODBC driver is not being used.

_________________
The eXpress train is coming - and it has more cars.


Top
 Profile  
 
PostPosted: Thu Aug 01, 2019 5:20 pm 
Offline
User avatar

Joined: Wed Feb 24, 2010 3:44 pm
Posts: 1185
rdonnay wrote:
Your screen shot shows that you are using the PGDBE and not the ODBCDBE, therefore your ODBC driver is not being used.
hm ... do you mean "Alaska-Software" Table :?:

these Table and Trigger are not create by "UpSize".
i use libpq.dll native (Demo Phil Ide) to import DBF to PostgreSQL Table.

how can i test if ODBC is used :?:

_________________
greetings by OHR
Jimmy


Top
 Profile  
 
PostPosted: Thu Aug 01, 2019 6:03 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4125
Location: Boise, Idaho USA
Quote:
Table and Trigger are not create by "UpSize".


I learned that UpSize is not required when adding tables to a PostGreSql database that is used by PGDBE.

The additional fields and tables added by DbfUpSize are only there for ISAM emulation, and an upsized table still performs badly in ISAM mode. Record numbers, Record count, etc. are not always reliable. If I were to create a new project using PostGreSql I think that PGDBE would be a fine database engine if only SQL was used.

I added a lot of tables to my 8.3 PostGreSql installation using the import routine of SqlQuery using the below procedure.
This procedure works with ADSDBE, ODBCDBE or PGDGE, whichever is bound to <oSession>. Try opening some of your tables in SQL mode and then ISAM mode. You can put the windows side by side. They will be opened in new threads. Then you can make comparisons. Press the Alt-D key to get a dot prompt so you can use database navigation commands.

Code:
STATIC FUNCTION _ImportDBF( cTable, cTargetName, self )

LOCAL aStruct, aStructNew, i, aTableType, lGoodUse, bError, ;
      oSession := ::sessionDict, cPath, cSavePath := DC_CurPath(), ;
      GetList[0], oProgress, oDlg, nCount, nEvery, nRecCount, ;
      cVia, lCancelled := .f.

aTableType := DC_DbeType(cTable)

IF 'DBF' $ aTableType[3]
  cVia := 'DBFDBE'
ELSEIF 'ADS' $ aTableType[3]
  DbeSetDefault('ADSDBE')
  DbeInfo( COMPONENT_DATA, ADSDBE_TBL_MODE, ADS_CDX )
  DbeInfo( COMPONENT_ORDER, ADSDBE_TBL_MODE, ADS_CDX )
  DbeInfo( COMPONENT_DATA, ADSDBE_TABLENAME_IS_ALIAS, .f. )

  cPath := DC_Path(cTable)
  cVia := ::AdsSessionCreate(cPath)
  cTable := DC_Path(cTable,.t.)
  DC_ChDir(cPath)
ELSEIF 'FOX' $ aTableType[3]
  cVia := 'FOXDBE'
ELSE
  DC_WinAlert( 'Unknown Database Type' )
  RETURN .f.
ENDIF

bError := ErrorBlock({|e|_Break(e)})
BEGIN SEQUENCE
lGoodUse := .f.

USE (cTable) ALIAS SOURCE EXCLUSIVE VIA (cVia)
lGoodUse := .t.
END SEQUENCE
ErrorBlock(bError)

IF !lGoodUse
  DCMSGBOX 'Error opening file: ' + cTable FONT '10.Lucida Console'  ;
     OWNER AppDeskTop()
  RETURN .f.
ENDIF

aStruct := DbStruct()
IF cTargetName = NIL
  cTargetName := cTable
ENDIF
cTargetName := MakeSqlTableName(cTargetName)
aStructNew := AClone(aStruct)

IF ::type = 'ODBC'
  AEval(aStructNew, {|e,i| aStructNew[i][1] := MakeSqlFieldName(aStructNew[i][1],oSession) })
  AEval(aStructNew, {|e,i| aStructNew[i] := MakeSqlFieldType(aStructNew[i], oSession) })
ENDIF

bError := ErrorBlock({|e|_Break(e)})
BEGIN SEQUENCE
lGoodUse := .f.

DbCreate(cTargetName, aStructNew, oSession)
USE (cTargetName) EXCLUSIVE VIA (oSession) ALIAS TARGET NEW
lGoodUse := .t.
END SEQUENCE
ErrorBlock(bError)

IF !lGoodUse
  DCMSGBOX 'Error creating table: ' + cTargetName FONT '10.Lucida Console' ;
     OWNER AppDeskTop()
  RETURN .f.
ENDIF

@ 0,0 DCSAY 'Creating table: ' + cTargetName

@ 2,0 DCPROGRESS oProgress SIZE 80,1 PERCENT COLOR GRA_CLR_CYAN, GRA_CLR_WHITE

@ 4,0 DCPUSHBUTTON CAPTION 'Cancel' SIZE 10,1.2 ;
      ACTION {||lCancelled := .t.}

DCREAD GUI FIT TITLE 'Importing Data' PARENT @oDlg EXIT

nRecCount := SOURCE->(RecCount())
nEvery := Int(nRecCount/200)
IF nEvery > 5000
  nEvery := 5000
ENDIF

nCount := 0
DO WHILE !SOURCE->(Eof()) .AND. !lCancelled
  nCount++
  IF nCount%100 == 0
    DC_CompleteEvents()
  ENDIF
  IF nEvery > 0 .AND. nCount%nEvery == 0
    DC_GetProgress(oProgress,nCount,nRecCount)
  ENDIF
  TARGET->(DbAppend())
  FOR i:= 1 TO TARGET->(Fcount())
    TARGET->(FieldPut(i, SOURCE->(FieldGet(i))))
  NEXT
  SOURCE->(dbSkip())
ENDDO
TARGET->(DbCommit())
SOURCE->(dbCloseArea())
TARGET->(dbCloseArea())

IF Valtype(cVia) == 'O'
  cVia:disconnect()
ENDIF

IF !lCancelled
  DCMSGBOX 'Done. ', ;
         'Table: ' + cTargetName + ' was created in Database: ' + ::database ;
         FONT '10.Lucida Console' OWNER AppDeskTop()
ENDIF

oDlg:destroy()

DC_ChDir(cSavePath)

RETURN .T.

_________________
The eXpress train is coming - and it has more cars.


Top
 Profile  
 
PostPosted: Thu Aug 01, 2019 8:57 pm 
Offline
User avatar

Joined: Wed Feb 24, 2010 3:44 pm
Posts: 1185
about PG-ODBC
i have installed ODBC Driver and add "PostgreSQL30 ANSI" to Datasource.
Attachment:
PostgreSQL30.JPG
PostgreSQL30.JPG [ 109.19 KiB | Viewed 3726 times ]


when double-Click in Treeview on "PG Test1" i got a XppFatal.LOG
Attachment:
XPPFATAL.ZIP [543 Bytes]
Downloaded 190 times


it work with Menu -> ODBC Drivers -> postgreSQL ANSI -> double-Click -> connect
than i can click in Treewiew on "PG Test1"

_________________
greetings by OHR
Jimmy


Top
 Profile  
 
PostPosted: Fri Aug 02, 2019 6:15 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4125
Location: Boise, Idaho USA
That error doesn't make sense.

Code:
IF !('PGDBE'$aDbeList) .AND. !DbeLoad( "PGDBE",.f.)  <<<<<<<<<<<<<<<<<<<  XPPFATAL.LOG error
  DC_WinAlert('Database-Engine PGDBE not loaded')
  RETURN .f.
ENDIF


Adding the new ODBC driver should have had no effect because PGDBE doesn't use ODBC drivers.

If you want to use the ODBC driver, you need to create a new connection:

You can added it to your SQLQUERY.INI file or you can click on Create New Connection from the menu.

Code:
[ODBC_4]
Name=PostGreSQL ANSI
Driver={PostgreSQL ANSI}
Uid=<your user id>
Pwd=<your password>
Database=<your database>


After adding it your your SQLQUERY.INI file, click on restart Sqlquery.exe from the menu.

If you have Teamviewer or Skype, I would like to arrange a time that I can connect to you and see if we can make this work for you.
Early in the morning works best for me. We have an 8 hour time difference. 8 am here is 4 pm in Germany.

_________________
The eXpress train is coming - and it has more cars.


Top
 Profile  
 
PostPosted: Fri Aug 02, 2019 10:34 am 
Offline
User avatar

Joined: Wed Feb 24, 2010 3:44 pm
Posts: 1185
rdonnay wrote:
That error doesn't make sense.
Code:
IF !('PGDBE'$aDbeList) .AND. !DbeLoad( "PGDBE",.f.)  <<<<<<<<<<<<<<<<<<<  XPPFATAL.LOG error
  DC_WinAlert('Database-Engine PGDBE not loaded')
  RETURN .f.
ENDIF

Adding the new ODBC driver should have had no effect because PGDBE doesn't use ODBC drivers.
i understand

rdonnay wrote:
If you want to use the ODBC driver, you need to create a new connection:

You can added it to your SQLQUERY.INI file or you can click on Create New Connection from the menu.

Code:
[ODBC_4]
Name=PostGreSQL ANSI
Driver={PostgreSQL ANSI}
Uid=<your user id>
Pwd=<your password>
Database=<your database>


After adding it your your SQLQUERY.INI file, click on restart Sqlquery.exe from the menu.
that is what i have done before

Code:
[PG_1]
Type=PG
Name=PG Test1
Driver=
Server=localhost
Database=mdidemo
UID=***
PWD=***
ConnectTimeOut=0
i see the Difference @Driver=

when create a new Connection i can't type into Field "Driver" while it is disable.
i add ={PostgreSQL ANSI} but still the same

_________________
greetings by OHR
Jimmy


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group