Hi,
I have records in a SqlLite table that I need to insert into a MsAccess table with the same structure.
Unfortunately I have to check each field in the export loop to check the data status:
if data is Null replace with '' if it is a text or 0 if is a number
if data is a date enter # character and reverse dd/mm
etc.
Initially I tried using:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
but the fieldType doesn't seem to follow the sequence of the actual fields:
for example I have :
(SqlLite table structure)
SELF INTEGER "SELF" INTEGER
TODAY TEXT "TODAY" INTEGER
NAME TEXT "NAME" TEXT
......
and the result of fieldType is
0
3
0
.... and so on without a clear correspondance (for me)
Perhaps the fields are not sorted in the same way?
In any case the "Cur.ColumnCount" returns the correct number of fields.
Then I tried PRAGMA:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
but the query returns only 1 record with the header:
"cid name type notnull dflt_value pk"
and nothing else.
What am i doing wrong?
Many thanks in advance
Paolo
			
			I have records in a SqlLite table that I need to insert into a MsAccess table with the same structure.
Unfortunately I have to check each field in the export loop to check the data status:
if data is Null replace with '' if it is a text or 0 if is a number
if data is a date enter # character and reverse dd/mm
etc.
Initially I tried using:
			
				B4X:
			
		
		
		 For b=0 To Cur.ColumnCount - 1
                fieldType=r.RunMethod2("getType", b, "java.lang.int")but the fieldType doesn't seem to follow the sequence of the actual fields:
for example I have :
(SqlLite table structure)
SELF INTEGER "SELF" INTEGER
TODAY TEXT "TODAY" INTEGER
NAME TEXT "NAME" TEXT
......
and the result of fieldType is
0
3
0
.... and so on without a clear correspondance (for me)
Perhaps the fields are not sorted in the same way?
In any case the "Cur.ColumnCount" returns the correct number of fields.
Then I tried PRAGMA:
			
				B4X:
			
		
		
		Cur = Starter.sql.ExecQuery("PRAGMA table_info('MyTable')")"cid name type notnull dflt_value pk"
and nothing else.
What am i doing wrong?
Many thanks in advance
Paolo
 
				 
 
		 
 
		 
 
		 
 
		