Main > Forum > 1C:Enterprise Platform > 1C:Query language and DCS > TempTableManager

Forum

Search UsersRules
TempTableManager
#1
Interested
Points:: 0
Joined:: Apr 5, 2012

Hi

I have a code. It doesn't work truely. Anyone who know exactly how works TempTableManager from script.

I have this script:

Code
AdresTablosu = New ValueTable;
AdresTablosu.Columns.Add("CaddeSokak");
AdresTablosu.Columns.Add("SatırID");
   
//CaddeSokak - CatalogRef typed
//SatırID - Number typed

Sorgu = New Query;
Sorgu.Text = "SELECT
      |   AdresTablosu.CaddeSokak,
      |   AdresTablosu.SatırID
      |INTO EvrakAdresTablosu
      |FROM
      |   &AdresTablosu AS AdresTablosu";
   
Sorgu.TempTablesManager = New TempTablesManager;
Sorgu.SetParameter("AdresTablosu", AdresTablosu);
Result = Sorgu.Execute();

The error message is:
Quote
{Document.RootAdresDeğişikliği_Hr.Form.DocumentForm.Form(183)}: Error calling context method (Execute)
Result = Sorgu.Execute();  
because:
{(2, 2)}: You cannot select type in query
<<?>>AdresTablosu.CaddeSokak,
TempTableManager doesn't support CatalogRef typed data?

Profile
#2
Interested
Points:: 0
Joined:: Apr 5, 2012

Developer Guide Chapter 8. Work with Queries Page 456.

There is notice:

Quote
IMPORTANT !
You can't create a temporary table if it is created based on value tables with a
UUID-type value in the columns
CatalogRef typed data is UUID-type?

Profile
#3
Active user
Points:: 0
Joined:: Sep 26, 2012

You need set types for columns, like this:

Code
AdresTablosu.Columns.Add("CaddeSokak", New TypeDescription("String"));
AdresTablosu.Columns.Add("SatırID", New TypeDescription("String"));

Profile
#4
Guest
Points::
Joined::

In your case:

Code
   AdresTablosu.Columns.Add("CaddeSokak", New TypeDescription("CatalogRef.<your catalog name>"));
   AdresTablosu.Columns.Add("SatırID", New TypeDescription("Number"));

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.