Create Volatile Tables in Visual Basic 2010

Connectivity
N/A

Create Volatile Tables in Visual Basic 2010

Hi all

i'm working in Visual Basic 2010 trying to create several volatile tables in Teradata database. The program creates some volatile tables and sometimes in random way (not for the same table), after the step of creation of the table, trying to read it, I receive the following error: "Tablename doesn't exist".

After this error, if I continue with the process, the following queries (create and read) runs correctly.

Below the connection string and an example of creation and reading queries:

<<

MDB4 = CreateObject("ADODB.Connection")
connessione = "Provide=.NET Framework Data Provider for Teradata;DSN=" & TeradataComboBox.SelectedItem.ToString & ";Database=P_Zxx_xx;UID=" & UsernameTextBox.Text & ";PWD=" & PasswordTextBox.Text & ";Connection Timeout=550"
MDB4.CommandTimeout = 0
MDB4.Open(connessione)

SQLA = "Create Volatile multiset table AF01_FACT as " & _
"(SELECT counterparty_cd, cast(acct_id as char(20)) as acct_id_2, nominal_amt, bucket_type_amt " & _
"FROM P_Zxx_xxx.FACT_Table " & _
"WHERE REFERENCE_DT = '" & DATA_2 & "' ) " & _
"with data on commit preserve rows"
RCD = MDB4.Execute(SQLA)

SQLA = "Select count(*) from AF01_FACT "
RCD = MDB4.Execute(SQLA)
>>