Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 5 of 5 total |
I think I broke it... |
Wed, Mar 9 2011 2:59 PM | Permanent Link |
David Loving | I think I broke the Blobs thread by pasting too much sample code.
Can't see a "reply" option anymore. |
Thu, Mar 10 2011 3:34 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | David
Looks like my reply got through. Roy Lambert |
Thu, Mar 10 2011 11:49 AM | Permanent Link |
David Loving | In the thread with the Blobs subject, I am no longer able to see or click on the Permanent Link or Reply options on the right side of the page. The final message I posted with the large BLOB seemed to have left the thread in a state where even the conversation paragraph(s) no longer Word Wrap. I can't read all of your last post as it extends beyond the screen width. This is with Internet Explorer 8 and Apple Safari... no matter how wide the browser window is opened.
To answer your last question in that thread... Our previous application was built on DBISAM. Each client exe connected with 60 plus tables through a shared folder on a network server. Many of our customers have created new hardware and software combinations for network attached storage and remote data centers... leading to many performance, locking and corruption issues. We can no longer keep up with all the possible configurations and also code around limitations introduced by the numerous combinations... so, we are migrating the application to ElevateDB Client / Server. All client exe table access will now go through a single Server application running as close to the storage device as possible. The DBISAM application had Delphi data modules containing table components that were opened when the application opened and a project was selected by a customer. It was easy to position a cursor on a record, edit, create a blobstream, read or write data, close the blobstream and post. Now, I wish to use a parameterized query to construct a SQL string to send to the remote Server. Certainly for performance reasons, I would like to minimize creating / freeing as few objects as possible. Summary: I need to construct a parameterized query to select, insert or update data that contains a blob field that may store an array of integer, double or structured values and still do not fully understand how I would use AsString on a parameter to do this. I had hope the reference to the AsVariant (that I find in the documentation but do not find as an option on ParamByName and can find no examples) was the best way to add binary data to the SQL statement. Whew... |
Fri, Mar 11 2011 4:17 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | David
>In the thread with the Blobs subject, I am no longer able to see or click on the Permanent Link or Reply options on the right side of the page. The final message I posted with the large BLOB seemed to have left the thread in a state where even the conversation paragraph(s) no longer Word Wrap. I can't read all of your last post as it extends beyond the screen width. This is with Internet Explorer 8 and Apple Safari... no matter how wide the browser window is opened. > >To answer your last question in that thread... Fortunately the only thing below that was my sig. >Our previous application was built on DBISAM. Each client exe connected with 60 plus tables through a shared folder on a network server. Many of our customers have created new hardware and software combinations for network attached storage and remote data centers... leading to many performance, locking and corruption issues. We can no longer keep up with all the possible configurations and also code around limitations introduced by the numerous combinations... so, we are migrating the application to ElevateDB Client / Server. All client exe table access will now go through a single Server application running as close to the storage device as possible. > >The DBISAM application had Delphi data modules containing table components that were opened when the application opened and a project was selected by a customer. It was easy to position a cursor on a record, edit, create a blobstream, read or write data, close the blobstream and post. Now, I wish to use a parameterized query to construct a SQL string to send to the remote Server. Certainly for performance reasons, I would like to minimize creating / freeing as few objects as possible. > >Summary: I need to construct a parameterized query to select, insert or update data that contains a blob field that may store an array of integer, double or structured values and still do not fully understand how I would use AsString on a parameter to do this. I had hope the reference to the AsVariant (that I find in the documentation but do not find as an option on ParamByName and can find no examples) was the best way to add binary data to the SQL statement. That, unfortunately, makes a lot of sense. I was hoping there was a trivial reason. so I could say "if it works just keep with the existing code" This is the bit of the manual that, for me, is most appropriate http://www.elevatesoft.com/manual?action=viewtopic&id=edb2sql&topic=Binary_Types If you're expecting to be able to just assign your array to a parameter and ElevateDB will understand it and parse it accordingly and store in a BLOB then I think you're out of luck. Ditto for the reverse, extracting it from a BLOB. BLOBs are just unstructured storage so somehow you're going to have to translate into something that SQL understands on the way in and something your app understands on the way out. AsVariant is a bit of a red herring since, as far as I know, it can only apply the range of transforms that Delphi can. How you'd use .AsString is fairly simple, once the query is prepared you simply do something like Query.ParamByName('ArrayInfo').AsString := BinaryToSQLStr(ConvertArrayToBytes(myArray)); rather than what I think you're hoping for Query.ParamByName('ArrayInfo').AsString := myArray; Roy Lambert [Team Elevate] |
Sun, Mar 13 2011 5:24 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | David,
<< I think I broke the Blobs thread by pasting too much sample code. >> It's fixed now, at least as best as it can. Word-wrapping long, unbreakable strings is not a strong suit of CSS or HTML. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |