Unknown issue in PostgreSQL Function - postgresql

I develop an application using VB6 and ODBC that fetch data from PostgreSQL function.
I used the function "F0006" to get information about item code, name, etc.
So far, my application runs smoothly on the current PC ( Windows 7 SP1 ). Because of the end of the support of Windows 7, we buy a new PC to replace the current that has Windows 10 installed.
We set up the same ODBC connection based on the currently running one and Connection success. But when we try to test our application to fetch the data, it seems can't find the function "F0006" and throw an unknown function message in the New PC ( Windows 10 ).
FYI, PostgreSQL is managed by others, and we don't have Admin DB access to it, and Active Directory is used in our network.
But if we try the same application in the current PC ( Windows 7 ) and other PC that using Windows 10 that has not configured to network AD, the application can get fetch data from the function.
Where could be the source of the problem?
Thanks

Related

Connecting to PostGreSQL through Microsoft Access 2019

We have a need to connect to a PG database using Microsoft Access 2018.
I downloaded the ODBC driver ( psqlodbc_12_01_0000-x64.zip). I made sure the driver was also added to the system path in environment variables ( C:\Program Files\psqlODBC\1201\bin) for both the user and the system. I then restarted my computer.
I checked the OBDC Drive in Admin and the drivers are listed.
I do have a 64-bit OS
When I try to make a connection to it in Microsoft Access ( External Data > New Data Source > Select Data Source > Machine Data Source > New) it doesn't appear as an option to connect to. What am I missing here?

PostgreSQL Bytea column as varchar results

I have this client where we installed a PGSQL server on his server (PGSQL 13 on port 5432)
There already was a postgresql server installed (8.3, port 15432).
No problems here.
Our application has a few 'bytea' columns where we store some encrypted data. Strange things happen when I launch a SQL on this column.
Exactly the same code gives different results on different computer.
For example: "Select ByteAColumn from RandomTable"
Results on my computer:
"E712F7671E929600C926003C61C4C696C27E89C8D836F85898737799DFAB1CC4"
Result on server where the Postgresql is installed:
"\x45373132463736373145393239363030433932363030334336314334433639364332374538394338443833364638353839383733373739394446414231434334"
Result on other computer in the network of the client:
"E712F7671E929600C926003C61C4C696C27E89C8D836F85898737799DFAB1CC4"
Result on "Select ByteAColumn::varchar from RandomTable" in PGAdmin 4:
\x45373132463736373145393239363030433932363030334336314334433639364332374538394338443833364638353839383733373739394446414231434334
My application expects the "E712F7671E929600C926003C61C4C696C27E89C8D836F85898737799DFAB1CC4" one and throws error on the result with '\x4...'.
I can avoid this using "Select encode(ByteAColumn,'escape') from RandomTable", this gives the right results. Modifying our entire application is near impossible.
In other words: the application runs fine on my computer, works fine on client computers / terminal server but not on the server where the postgreSQL database is hosted.
I've been using this application for over a year now. I have done many installations of this application and never have had this issue before. I've tested the query on other installations where everything is fine, and there I also get the '\x45...' result, but using the query in my application works great.
What causes this?
Is it the PostgreSQL 8.3 server which interferes somehow? I've been testing and searching a whole day now and I can't seem to find the answer.
Help would be greatly appreciated.
Thanks!

Flamerobin doesn't connect to Firebird database (msg: -902 isc_attach_database failed)

I'm studying Firebird 2.5 with FlameRobin 0.9, installed on a VM Virtualbox (with O.S. Win7 32bit PRO). The .fdb files are on the same disk of the Firebird machine and the FlameRobin program. The machine is not embedded and run as Superserver.
With FlameRobin I've created more than one.FDB file, created tables, triggers, generators, etc: all works fine.
I use Delphi7 to create executables that utilize the .fdb file.
Yesterday, during a proof, Delphi arise an error of "out of system resource": disconnect .FDB in Flamerobin, close Flamerobin (quit), close the VM; re-open the VM, re-open FlameRobin, re-register the .fdb... error:
IBPP:: SQLException; Context: Database::Connect; Message: SC_ATTACH_DATABASE
failed; SQL message: -902 unsuccessful execution caused by a system error
that precludes successful execution of subsequent statements. Unable to
complete network request to host LocalHost.
On the VM there is no antivirus and Windows firewall is disabled (on the host machine, Avast Internet Security is running).
I've haven't varied any parameters, all is developed as described.
In the .conf file, the Firebird machine can connect to all.
If I use a program compiled with Delphi, to insert or update some record in a Firebird table, all works fine, but FlameRobin doesn't want connect to Fdb.
In FlameRobin, the item "user manager" lists SYSDBA-masterkey and another user added by me 10 days ago.
On Internet, I've not found cases of the kind. Does it depend on Win7? And how? Can someone help me, to continue the work? Thanks for any suggestion that can be useful to understand the problem.

Writing to Application Log on a remote Windows 7 machine

I need to write to an application log on a remote Window 7 computer. When my PC was running Windows 7, I could do so using a Write-Entry cmdlet, eventcreate, WriteEvent API, or LogEvent in VBS. Since upgrading my PC to Windows 10 (v1511), this no longer works failing with an error "The procedure number is out of range". I can write to an application log on a remote Window 10 machine, but the problem is with the remote (not firewalled) Window 7 PC. How can this problem be solved?

SQL linked server with filemaker

I have a client with FileMaker Pro 11 Advanced.
I need to be able to connect to the filemaker database via SQL. I am using MS SQL Server 2008 R2, or Server 2012 can be used.
These are the steps I have tried
0) Turned on ODBC/JDBC sharing in File -> Sharing on FileMaker Pro 11 Advanced for "All Users"
1) installed the FileMaker OBDC driver included on the filemaker disc
2) odbcad32.exe in C:\Windows\SysWOW64 and added a new filemaker System DSN and directed it to the filemaker database.
3) Attempted to add a linked server to SQL using Provider Microsoft OLE DB Provider for OBDC Drivers and the System DSN name i created for Data Source. I left all other fields blank.
I get this error:
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "FILEMAKER2".
OLE DB provider "MSDASQL" for linked server "FILEMAKER2" returned message "[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application". (Microsoft SQL Server, Error: 7303)
FILEMAKER2 is the what i called the System DSN.
What am I doing wrong/What do I need to correct in order to connect to filemaker with SQL?
Is there a connection string to put in for Provider String?
I have the same mismatch error trying to do a test connect with access.
Thank you for any help.
The error you're getting is because of the driver installed is a 32bit driver propably on a 64bit system.
Look in the downloads of FM for the correct xbit driver.
I've connected to FM using ODBC from PHP apps to do basic inserts, updates, deletes of data. I haven't worked with it like you're attempting to do, though, and like #ted said, FM really wasn't built as a SQL platform.
Their answer to this was to go the other way around. You can setup External SQL sources within FileMaker, and bind your SQL database to FM so that those tables show up in FM the same as regular FM tables. These tables can then be used within FM scripts accordingly, so you could setup any data sync steps necessary there. You could create scripts to move data from FM layouts into the SQL DB layouts at given intervals throughout the day, for example.
Hope that helps.
FileMaker 11 only comes with a 32 bit ODBC driver. The error you got happens when you use a 32 bit driver with the 64 bit ODBC admin utility. Set up your DSN using the 32 bit utility, found here:
C:\Windows\SysWOW64\odbcad32.exe
...and it will work fine.