Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Inserting CF Arrays/Structures/Queries in SQL Server

New Here ,
Jul 06, 2009 Jul 06, 2009

Hi there

For one reason or another, I am looking for a way to insert (and extract at a later time) a cfquery, Struct Object and/or an Array in SQL Server.

That is to say, I am trying to insert the entire object in one column of one row, rather than the rows or elements of the cfquery/Struct/Array in separate rows of a SQL Server table.

Does anyone know if this is possible?

Thank you for your assistance in advance.

Regards

Boon

TOPICS
Advanced techniques
902
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 06, 2009 Jul 06, 2009

You'll need to serialize the cfquery/struct/array object before saving

to the database and deserialize when extracting from the database. If

you're on CF7 then take a look at cfwddx, if you're on CF8 you can use

serializeJSON or cfwddx (I would recommend serializeJSON because the

length of the generated serialization is smaller).

Mack

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 07, 2009 Jul 07, 2009
LATEST

Thanks for this Mack, I'll check it out.

Regards

Boon

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources