Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListSQL Question ...SQL Question ...
Previous
 
Next
New Post
6/5/2007 9:17 PM
 

I am using the SQL script below to import records from another module that I have. The script completes succesfully (or so it claims) but the only thing that happens is that the EXECUTE UserDefinedTable_AddRow 440 truly runs successfully. The @RowID variable gets the correct UserDefinedRow number because I verified the statement using Query Analyzer. Is there any way I can add data to the UDT module using SQL queries?

Thank you for your time.

Note that all items marked as $(Whatever) are placeholders for the module I am importing from.

CODE:

USE [DatabaseName]

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

EXECUTE UserDefinedTable_AddRow 440

DECLARE @RowID Int

SET @RowID = (SELECT TOP 1 UserDefinedRowID FROM UserDefinedRows ORDER BY UserDefinedRowID DESC) + 1

EXECUTE UserDefinedTable_AddData @RowID, 1, '$(UserID)'

EXECUTE UserDefinedTable_AddData @RowID, 2, N'GETDATE'

EXECUTE UserDefinedTable_AddData @RowID, 3, '$(UserID)'

EXECUTE UserDefinedTable_AddData @RowID, 4, N'GETDATE'

EXECUTE UserDefinedTable_AddData @RowID, 5, '$(TourName)'

EXECUTE UserDefinedTable_AddData @RowID, 6, '$(Country)'

EXECUTE UserDefinedTable_AddData @RowID, 7, '$(City)'

EXECUTE UserDefinedTable_AddData @RowID, 8, '$(TourMonths)'

EXECUTE UserDefinedTable_AddData @RowID, 9, '$(TourPrice)'

EXECUTE UserDefinedTable_AddData @RowID, 10, '$(TourDescription)'

EXECUTE UserDefinedTable_AddData @RowID, 11, '$(Web)'

EXECUTE UserDefinedTable_AddData @RowID, 12, '$(pictureattach)'

EXECUTE UserDefinedTable_AddData @RowID, 13, '$(TourCatagories)'

EXECUTE UserDefinedTable_AddData @RowID, 14, '$(Hotel)'

EXECUTE UserDefinedTable_AddData @RowID, 15, '$(Airfare)'

EXECUTE UserDefinedTable_AddData @RowID, 16, '$(Email)'

EXECUTE UserDefinedTable_AddData @RowID, 17, '$(StateProvince)'

GO


Regards,
Christopher Koeber
 
New Post
6/6/2007 2:01 AM
 

It seems that you did not define your schema before!. You must setup setup a table and define the fields. Or how do you get these values 1 -17? You also must have add the four udt system fields [created/changed][by/at/]

It would be easier to write code that imports your data, using the udt controller class! Look at the import routine, this shows how to deal with UDT data.

 
New Post
6/6/2007 5:04 PM
 

I set up the table already, the values 1-17 are the field IDs that map to the UserDefinedFields table.

I'll take a look at the UDT controller class but in the meantime is there anyway to import UDT data using straight SQL?


Regards,
Christopher Koeber
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListSQL Question ...SQL Question ...


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out