TMSScript component with dataset / Wrong fieldlist

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ms31d300
Posts: 4
Joined: Mon 27 Mar 2017 09:12

TMSScript component with dataset / Wrong fieldlist

Post by ms31d300 » Mon 27 Mar 2017 15:01

Hi SDAC Support Team,

i've three components added to my form:
1.TMSConnection / Provider :prNativeClient / Autocommit = false
2.TMSScript / DataSet : TMSQuery ( see 3.)
3. TMSQuery

The SQL string of the TMSScript component is :

Code: Select all

SELECT * FROM sys.databases
The following events were added to the form:

Code: Select all

void __fastcall TForm1::Button1Click(TObject *Sender)
{
	MSConnection1->PerformConnect(false);
	MSScript1->Execute();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::MSScript1AfterExecute(TObject *Sender, UnicodeString SQL)
{
	while (!MSQuery1->Eof )	{
		for (int i = 0; i < MSQuery1->FieldDefList->Count; i++)	{  
WideString sField = MSQuery1->FieldByName(MSQuery1->FieldDefList->Strings[i])->AsWideString;
		}
		MSQuery1->Next();
	}
}
After pressing the button, the error
Field depid couldn't found
occured.

See the fieldlist of the TMSQuery component :

name,database_id,source_database_id,owner_sid,create_date,compatibility_level,collation_name,user_access,user_access_desc,is_read_only,
is_auto_close_on,is_auto_shrink_on,state,state_desc,is_in_standby,is_cleanly_shutdown,is_supplemental_logging_enabled,
snapshot_isolation_state,snapshot_isolation_state_desc,is_read_committed_snapshot_on,recovery_model,
recovery_model_desc,page_verify_option,page_verify_option_desc,is_auto_create_stats_on,is_auto_create_stats_incremental_on,
is_auto_update_stats_on,is_auto_update_stats_async_on,is_ansi_null_default_on,is_ansi_nulls_on,is_ansi_padding_on,
is_ansi_warnings_on,is_arithabort_on,is_concat_null_yields_null_on,is_numeric_roundabort_on,is_quoted_identifier_on,
is_recursive_triggers_on,is_cursor_close_on_commit_on,is_local_cursor_default,is_fulltext_enabled,
is_trustworthy_on,is_db_chaining_on,is_parameterization_forced,is_master_key_encrypted_by_server,
is_query_store_on,is_published,is_subscribed,is_merge_published,is_distributor,is_sync_with_backup,service_broker_guid,
is_broker_enabled,log_reuse_wait,log_reuse_wait_desc,is_date_correlation_on,is_cdc_enabled,is_encrypted,
is_honor_broker_priority_on,replica_id,group_database_id,resource_pool_id,default_language_lcid,default_language_name,
default_fulltext_language_lcid,default_fulltext_language_name,is_nested_triggers_on,is_transform_noise_words_on,
two_digit_year_cutoff,containment,containment_desc,target_recovery_time_in_seconds,delayed_durability,
delayed_durability_desc,is_memory_optimized_elevate_to_snapshot_on,
depid,class,depsubid,class_1,value,class_2,value_1,class_3,value_2,class_4,value_3,class_5,value_4,class_6,
value_5,depid_1,class_7,depsubid_1,depid_2,class_8,depsubid_2,class_9,id,id_1,class_10,subid,id_2,class_11,subid_1,class_12,value_6,valclass,objid,subobjid,valnum


I think you've forgotten to initialize the fieldlist of the TMSQuery component !?!

Best regards

ms31d300
Posts: 4
Joined: Mon 27 Mar 2017 09:12

Re: TMSScript component with dataset / Wrong fieldlist

Post by ms31d300 » Thu 13 Apr 2017 09:49

Hi Devart Team,

I'm waiting for your response for about two weeks.

Best regards

azyk
Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: TMSScript component with dataset / Wrong fieldlist

Post by azyk » Thu 20 Apr 2017 12:54

Thank you for the information. We reproduced described behavior and are investigating it now. We will inform you about the results.

Post Reply