Delphi 6 TQuery cannot modify a read-only dataset in one windows XP machine - windows-xp

I have an issue with an old Delphi 6 app, that i had to edit lately.
The case is that i had to use a TQuery to edit some data, so i created a TQuery, TDataSource and TDBEdit, i Linked the DataSource to the query, created all the fields in the query and then linked the DBedit to the DataSource.
the database that is used is DBase IV with BDE.
On change of the field i do the next code :
if not (DM.qryPrecios1.State in [dsEdit, dsInsert]) then begin
DM.qryPrecios1.Edit;
end;
and in a button afterwords i do
if DM.qryPrecios1.State in [dsEdit, dsInsert] then
DM.qryPrecios1.Post;
The curiosity of the case is that in my windows XP this works correctly without any issue, it updates the correct field etc..
but when i went to update the client machine that is windows XP as well, i get the next error when i try to change the TDBEdit = 'qryPrecios1 cannot modify a read only dataset'
Im confused as if its a case of the app or of some dll missing in the client machine?
Thank you for the help in regards.

Well it seems that it was a Delphi 6 IDE Bug.... after i created a new TQuery copying the old one, the TQuery that didnt work started to work without changing anything.

Related

Different date value retrieved from google sheet in Apps Script V8 and Legacy

I have this very simple 4 lines of code to retrieve a duration value in google sheet from Google Apps Script. The sheet is blank and has this only value for this test.
function myFunction() {
var my_ss = SpreadsheetApp.getActiveSpreadsheet();
var my_sh = my_ss.getSheetByName("test");
var my_value = my_sh.getRange("A1").getValue();
console.log(my_value);
}
When I run this in the new runtime V8, I got the good duration of 5 minutes (with bad GMT but I don't use this). But with the current bug on V8 where we can't use the console to develop arrays and object, I downgraded the script to Apps script Legacy, and when I execute the exact same code (I mean I don't do anything but downgrading the environment with the Run menu), then I got the good GMT but the wrong duration! I got 55 minutes and 39 seconds instead of 5 minutes!
I checked the time zone in apps script V8, apps script legacy and google sheet, it's the same every where, "GMT+01:00 Paris".
Even stranger: this test is actualy performed from a copy of an original file created on august 2019. In the original file I got the opposite behavior. I got the good value with apps script legacy, but with runtime V8 I got a different value (I got 23:14:21 instead of 00:05:00).
Does anyone else encounter this behaviors? Do you know how to run apps script legacy on new files without these problems? Thanks.
As a workaround you can use getDisplayValue() instead :
var my_value = my_sh.getRange("A1").getDisplayValue();
and then, based on this value, you can construct a date object of your preference.
So, I noticed that we had this issue only in the case we upgrade to V8 on a file that has was created before V8 was published (and vice versa). So to avoid this, if I have an old file where I want to upgrade apps scripts to V8, I copy the file first, and in the new file (so a recent one when V8 already exists), then I don't encounter the problem...

How to decode a string in Visual Basic 6

I'm trying to read .DB (Paradox 5) file within my Visual Basic 6.
Everything's OK except encoding/charset. It shows as Iieiei 75a instead of cyrillic string.
This is my ODBC Connection string:
Driver={Microsoft Paradox Driver (*.db )};DriverID=538;Fil=Paradox 4.X;DataCodePage=ANSI;BDE=2;CollatingSequence=ASCII;AutoTranslate=No;DBQ=C:\Database;DefaultDir=C:\Database
Please note that software like Borland Database Desktop shows this strings without any problems. Also everything is fine in another PC.
I set following settings via regedit, by it doesn't help:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Xbase]
"DataCodePage"="ANSI"
"BDE"=dword:00000002
I also tried to use CharToOem/Oem2Char Win API functions, it doesn't help.
Any ideas?
Okay I have solved this by changing following registry values:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Xbase]
"DataCodePage"="ANSI"
"BDE"=dword:00000002
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage]
"1252"="1251.nls"
Last setting has solved the issue.

Confluence pocketquery macro fetching unwanted word along with result from PostgreSQL

Hi I'm using a Confluence macro called 'PockketQuery'(PQ). I have connected to a server located at my client's base through PostgreSQL. I run PQ to fetch results from the db into my confluence page. However, it's fecthing an extra unwanted word "Hallo" along with every result. I m unable to figure out where this string maybe coming from and getting attached to my results like this. Please help me get rid of it.
For example I run a PQ on the db which is supposed to fetch me result "Jack London", so the result that I see is "hallo Jack London".
Note: I use VPN to connect to my client's server and Confluence.
Are you using the latest version from the Marketplace 1.14.6? This issue shouldn't exist in the latest version.
I got an upgrade to version 1.14.6 of Confluence's PocketQuery macro. The issue that I had is resolved, the unwanted string in the result is there no more. The bad part is they don't mention it anywhere on the macro's bug fixes. There are no release notes attached to this fix.Thank you Felix for your help.

Why would LayoutObjectNames return an empty string in FileMaker 14?

I'm seeing some very strange behavior with FileMaker 14. I'm using LayoutObjectNames for some required functionality. On the development system it's working fine. It returns the list of named objects on the layout.
I close the file, zip it up and send it to the client, and that required functionality isn't working. He sends the file back and I open it and get a data viewer up. The function returns nothing. I go into layout mode and confirm that there are named objects on the layout.
The first time this happened and I tried recovering the file. In the recovered file it worked, so I assumed some corruption had happened on his end. I told him to trash the file I had given him and work with a new version I supplied. The problem came up again.
This morning he sent me the oldest version that the problem manifested in. I confirmed the problem, tried recovering it again, but this time it didn't fix the problem.
I'm at a loss. It works in the version I send him, doesn't on his system. We're both using FileMaker 14, although I'm using Advanced. My next step will be to work from a served file instead of a local one, but I have never seen this type of behavior in FileMaker. Has anyone seen anything similar? Any ideas on a fix? I'm almost ready to just scrap the file and build it again from scratch since we're not too far into the project.
Thanks, Chuck
There is a known issue with the Get (FileName) function when the file name contains dots (other that the one before the extension). I will amend my answer later with more details and a possible solution (I have to look it up).
Here's a quote from 2008:
This is a known issue. It affects not only the ValueListItems()
function, but any function that requires the file name. The solution
is to include the file extension explicitly in the file name. This
works even if you use Get (FileName) to return the file name
dynamically:
ValueListItems ( Get ( FileName ) & ".fp7" ; "MyValueList" )
Of course, this is not required if you take care not to use period
when naming your files.
http://fmforums.com/forums/topic/60368-fm-bug-with-valuelistitems-function/?do=findComment&comment=285448
Apparently the issue is still with us - I wonder if the solution is still the same (I cannot test this at the moment).

Entity framework 6 + network

I have the following DB Model
At home I work with Visual Studio and SQL-Server on my PC. Now I took the PC at work and tried to create an EFModel using a SQL-Server in our network.
Creating the Model at work I get 44 Errors.
First curious thing (for me) is i get a msgbox with "Running this text template can potentially harm your computer.Do not run it , if u obtained it from an untrusted source..." i confirmed with ok (two times for 2 pop ups). Afterwards I see 44 Errors. After a few minutes I get the same msgbox as above again. After pressing OK a few errors are deleted (now I have 32 Errors).
Since I have the german express version I try to translate the remaining errors by structure:
"Public Property WindesName as String" has many definitions with identical signatures.
variable "_WindowsName" creates a conflict with a property "WindowsName" that is an implicitly declared member of class "Name"
I have this kind of errors for every field.
What I tried: I actually wanted to create the Model into a program, that doesnt work. Then i used a blank application, doesent work too. I reinstalled EF from nuget with no effect.
Maybe it has something to do with the model or with the network. Any help is welcome.
Ok, I was able to fix it. I changed Code Generation Strategy to Standard, deleted the two .tt files and rebuild the project. Now it is working.