- Posts: 109
SQL Heater Insert Into
- JD Cox
- Topic Author
- Offline
- User
Less
More
8 years 1 month ago #2937
by JD Cox
SQL Heater Insert Into - Post(2937) was created by JD Cox
Attachments:
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
8 years 1 month ago - 8 years 1 month ago #2940
by FlowHeater-Team
Best wishes
Robert Stark
Replied by FlowHeater-Team on topic SQL Heater Insert Into - Post(2940)
Hi JD,
I guess I’ve just forgot the bracket for the SQL values section!
SQL Heater Troubleshooting) You can easly check the syntaxt after you receive the error. Open the red marked SQL Heater and press the „Reveal effective SQL statement after parameter subtitution“. Now you see the real SQL Statement that you can execute on the database to check the syntax.
I guess I’ve just forgot the bracket for the SQL values section!
SQL Heater Troubleshooting) You can easly check the syntaxt after you receive the error. Open the red marked SQL Heater and press the „Reveal effective SQL statement after parameter subtitution“. Now you see the real SQL Statement that you can execute on the database to check the syntax.
Best wishes
Robert Stark
Last edit: 8 years 1 month ago by FlowHeater-Team.
Please Log in or Create an account to join the conversation.
- JD Cox
- Topic Author
- Offline
- User
Less
More
- Posts: 109
8 years 1 month ago #2942
by JD Cox
Replied by JD Cox on topic SQL Heater Insert Into - Post(2942)
I do reveal the effects to be sure I have the parameters set right, and all looked good.
I added the parenthesis to the VALUE section...thanks sorry I missed that.
I'm no longer getting the error but it does not insert the data and it makes the table I'm trying to write to Read-Only.
FYI, this is not the same table I'm exporting from, does that matter?
I added the parenthesis to the VALUE section...thanks sorry I missed that.
I'm no longer getting the error but it does not insert the data and it makes the table I'm trying to write to Read-Only.
FYI, this is not the same table I'm exporting from, does that matter?
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
8 years 1 month ago #2943
by FlowHeater-Team
Best wishes
Robert Stark
Replied by FlowHeater-Team on topic SQL Heater Insert Into - Post(2943)
Hi JD,
you can use any table on the selected side/database inside the SQL Heater that should be not the problem.
Do you use on READ and WRITE the same database? In this case you have to switch „Which side“ to „WRITE“. The Reason why is FlowHeater use database transactions uasally just for the WRITE side. If you use an SQL Heater on the READ FlowHeater creates automatically a new transaction on READ and this transaction blocks the WRITE side if the same database.
you can use any table on the selected side/database inside the SQL Heater that should be not the problem.
Do you use on READ and WRITE the same database? In this case you have to switch „Which side“ to „WRITE“. The Reason why is FlowHeater use database transactions uasally just for the WRITE side. If you use an SQL Heater on the READ FlowHeater creates automatically a new transaction on READ and this transaction blocks the WRITE side if the same database.
Best wishes
Robert Stark
Please Log in or Create an account to join the conversation.
- JD Cox
- Topic Author
- Offline
- User
Less
More
- Posts: 109
8 years 1 month ago #2944
by JD Cox
Replied by JD Cox on topic SQL Heater Insert Into - Post(2944)
To give you a little more info the Read side is an AccessAdapter (Front end) where we create an end of day file for our customers. When we export that file Write TextFileAdapter (.csv) I want to record some of that transaction back in a table on the Read side where we'll use that on the customer portal so they can retrieve their own files.
Thanks, JD
Thanks, JD
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
8 years 1 month ago - 8 years 1 month ago #2945
by FlowHeater-Team
Best wishes
Robert Stark
Replied by FlowHeater-Team on topic SQL Heater Insert Into - Post(2945)
Hi JD,
for me it´s not clear what you mean with „makes the table I'm trying to write to Read-Only“. Did you receive another error message or does the export hang?
I´ve made a short example for you including an Access database with test data, please have a look to the attachment.
For a bit more analytic would it be posible to post your created FlowHeater Defintionen.
for me it´s not clear what you mean with „makes the table I'm trying to write to Read-Only“. Did you receive another error message or does the export hang?
I´ve made a short example for you including an Access database with test data, please have a look to the attachment.
For a bit more analytic would it be posible to post your created FlowHeater Defintionen.
Best wishes
Robert Stark
Attachments:
Last edit: 8 years 1 month ago by FlowHeater-Team.
Please Log in or Create an account to join the conversation.
- JD Cox
- Topic Author
- Offline
- User
Less
More
- Posts: 109
8 years 1 month ago #2946
by JD Cox
Replied by JD Cox on topic SQL Heater Insert Into - Post(2946)
Well I was hoping you would not have to go to that much trouble but I think I see the problem.
First, it locks the table I'm trying to write to. When I close fh it frees up the table but I notice it does use the auto numbers.
So it is getting to the right place. If I manually key in data, auto number, skips the number of tries with fh.
But, thanks to your sample I see there is one difference in the sql heater, the adapter dropdown selection.
could that be the cause?
First, it locks the table I'm trying to write to. When I close fh it frees up the table but I notice it does use the auto numbers.
So it is getting to the right place. If I manually key in data, auto number, skips the number of tries with fh.
But, thanks to your sample I see there is one difference in the sql heater, the adapter dropdown selection.
could that be the cause?
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
8 years 1 month ago #2947
by FlowHeater-Team
Best wishes
Robert Stark
Replied by FlowHeater-Team on topic SQL Heater Insert Into - Post(2947)
Hi JD,
The Adapter dropdown has been changed with version 4.0.5 . This change was just for multi adapter Definitions and should be no affect in singel adapter Definitions (one adapter on each side). Which version do you use, does the example work like expected?
Please try to switch of “Use database transaction” on the advanced tab for the Access Adapter on the READ side.
The Adapter dropdown has been changed with version 4.0.5 . This change was just for multi adapter Definitions and should be no affect in singel adapter Definitions (one adapter on each side). Which version do you use, does the example work like expected?
Please try to switch of “Use database transaction” on the advanced tab for the Access Adapter on the READ side.
Best wishes
Robert Stark
Please Log in or Create an account to join the conversation.
- JD Cox
- Topic Author
- Offline
- User
Less
More
- Posts: 109
8 years 1 month ago #2948
by JD Cox
Replied by JD Cox on topic SQL Heater Insert Into - Post(2948)
V3.5.3
But you’re right it does not matter. I’ll spare you all the details but I recreated your example on our environment and it worked fine. But, when I do the same thing in the def I’m working or it does not work. I’m going to start fresh next week if I discover the problem I’ll be sure to let you know.
Thanks or all your help.
JD
But you’re right it does not matter. I’ll spare you all the details but I recreated your example on our environment and it worked fine. But, when I do the same thing in the def I’m working or it does not work. I’m going to start fresh next week if I discover the problem I’ll be sure to let you know.
Thanks or all your help.
JD
Please Log in or Create an account to join the conversation.
- JD Cox
- Topic Author
- Offline
- User
Less
More
- Posts: 109
8 years 1 month ago #2951
by JD Cox
Here’s a reduced copy of what I’m working with. I hope you can tell me what it is I’m doing wrong.
Replied by JD Cox on topic SQL Heater Insert Into - Post(2951)
Here’s a reduced copy of what I’m working with. I hope you can tell me what it is I’m doing wrong.
Attachments:
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
8 years 1 month ago #2952
by FlowHeater-Team
Best wishes
Robert Stark
Replied by FlowHeater-Team on topic SQL Heater Insert Into - Post(2952)
Hi JD,
I’ve found the issue. The issue is related to the Sort Heater and the “Memory” execution mode. Use instead a “ORDER BY” in the Access Adapter and the “Massdata” mode and the definition will run.
For example: select * from [tblzOrdersXport] order by strOrderNumber
I’ve found the issue. The issue is related to the Sort Heater and the “Memory” execution mode. Use instead a “ORDER BY” in the Access Adapter and the “Massdata” mode and the definition will run.
For example: select * from [tblzOrdersXport] order by strOrderNumber
Best wishes
Robert Stark
Please Log in or Create an account to join the conversation.
- JD Cox
- Topic Author
- Offline
- User
Less
More
- Posts: 109
8 years 1 month ago #2953
by JD Cox
Replied by JD Cox on topic SQL Heater Insert Into - Post(2953)
As always, Robert I can’t thank you enough. I never thought about order by in the adapter. It works great and this is going to be a big help on a current project. On a side note we’ll be updating to 4.0 soon I’m really looking forward to flowheater server but we need to make some upgrades on our side first. Thanks again, JD
Please Log in or Create an account to join the conversation.
Time to create page: 0.332 seconds