sqlexec parameters input / output

This forum is meant for questions about the Visual FoxPro Language support in X#.

User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

sqlexec parameters input / output

Post by robert »

Juan,
Thanks for the detailed example.
I'll split it in several distinct examples for testing our compiler
- passing mvar by reference
- text .. endtext
- sqlexec and parameter detection
- sqlexec and out parameters
- local variables as parameters for sqlexec
- memory variables as parameters for sqlexec
- precision of values passed and returned by sqlexec
I'll create examples / tests for each of these and will let you know what works and what doesn't.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
jpmoschi
Posts: 77
Joined: Thu May 21, 2020 3:45 pm

sqlexec parameters input / output

Post by jpmoschi »

Good morning guys,
I just downloaded the new version and I just want to ask you: Was this Topic revised in this version or not?
If the answer is no, is it possible to know if it will be on the roadmap? and if possible, when it will happen?
best regards
Juan
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

sqlexec parameters input / output

Post by robert »

Juan,
No this was not fixed. It slipped through, since there was no issue for it in out Github issue tracker.
I have just created the issue and will look into this asap.
https://github.com/X-Sharp/XSharpPublic/issues/822

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
jpmoschi
Posts: 77
Joined: Thu May 21, 2020 3:45 pm

sqlexec parameters input / output

Post by jpmoschi »

good afternoon forum
Continuing with the idea of ​​improving the open source XSharp project from the FoxPro programmers point of view. I just uploaded this enhancement. It is my 2nd contribution, before I solved some MEM file formats and I hope it will be contagious for the community. The XSharp team needs our support, they cannot solve the changes that the integration with Visual Studio requires and also move closer to the VFP dialect
Unfortunately I only have Oracle AND MSSqlServer to test my changes
The modified programs were
XSharpPublicRuntimeXSharp.VFPSQLSQLFunctions.prg
XSharpPublicRuntimeXSharp.VFPSQLSQLStatement.prg

Robert, can you see the changes on GitHub?
Best regards
Juan
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

sqlexec parameters input / output

Post by robert »

Juan,
If you have commited the changes to GitHub then they are in your "clone" (called Fork in GitHub) of our repo.
You cannot write to our repo directly for security reasons.
You need to send us a "Pull Request" to us for these changes.

Here are the docs on how this works:
https://docs.github.com/en/pull-request ... rom-a-fork

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
jpmoschi
Posts: 77
Joined: Thu May 21, 2020 3:45 pm

sqlexec parameters input / output

Post by jpmoschi »

the message is Merging is blocked
I suppouse that it is normal or not?

Can you follow this link?
https://github.com/X-Sharp/XSharpPublic/pull/907
User avatar
kevclark64
Posts: 127
Joined: Thu Aug 15, 2019 7:30 pm
Location: USA

sqlexec parameters input / output

Post by kevclark64 »

Just out of curiosity ... what enhancements were you able to make in the SQL functions?
jpmoschi
Posts: 77
Joined: Thu May 21, 2020 3:45 pm

sqlexec parameters input / output

Post by jpmoschi »

hello Kevin
I recommend the FoxPro online to understand the power of the FoxPro SqlExec command with parameters
Why do I use it, because it is really powerful and scalable in my large VFP application with more than 3000 menues points, 2000 tables and 5 million lines of code (500 mem files)

All the interaction between my applications and any RDBMS is done through this SqlExec function in combination with automatically generated stored procedures on each platform.

Xsharp is really close to FoxPro in many ways and the team needs people who think like FoxPro developers willing to contribute beyond reporting bugs.
Last comment, the last thing I fixed is that before execution ends, it is positioned in the result workarea and Recno = 1.

Best regards
Juan
User avatar
kevclark64
Posts: 127
Joined: Thu Aug 15, 2019 7:30 pm
Location: USA

sqlexec parameters input / output

Post by kevclark64 »

I use parameterized queries from Foxpro to Postgres in my programs all the time. If you've got that working it's really good news. I also appreciate setting recno at 1, since I've had to issue Goto 1 commands to get that done so far.

I thought my application was pretty big, but it's only around 250K lines, so you've really got me beat.
jpmoschi
Posts: 77
Joined: Thu May 21, 2020 3:45 pm

sqlexec parameters input / output

Post by jpmoschi »

Kevin, your parameterised queries are part of the same VFP concept "SQL Pass-Through Technology". It is the 1st brick under FoxPro approach to remote data. Mounted over "sql* functions" lives "Remote Views", (read in VFP Help on line "Selecting the Right Methods"). You chose the general option and me the complex one but with another rule: The critical transactions begin always on the RDBMS
I had not asked before because i do not use it. How did you solve it in xsharp?
Post Reply