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

Inserting CF Arrays/Structures/Queries in SQL Server

New Here ,
Jul 06, 2009 Jul 06, 2009

Copy link to clipboard

Copied

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

Views

858

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

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

Regards

Boon

Votes

Translate

Translate

Report

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
Documentation