TempTableManager

Common questions about 1C:Query language, Query builder tool and Data composition schema

#1
People who like this:0Yes/0No
Interested
Rating: 27
Joined: Apr 5, 2012
Company: 1TÇ Şirketi - Merv Bilgi İşlem Otomasyonu Yazılım Ltd. Şti.

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?

Edited: Murat Yazlıyev - Apr 08, 2013 12:44 AM
 
#2
People who like this:0Yes/0No
Interested
Rating: 27
Joined: Apr 5, 2012
Company: 1TÇ Şirketi - Merv Bilgi İşlem Otomasyonu Yazılım Ltd. Şti.

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?

 
#3
People who like this:0Yes/0No
Active user
Rating: 7
Joined: Sep 26, 2012
Company: individual

You need set types for columns, like this:

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

 
#4
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

In your case:

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

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.