[RESOLVED] Working with data question
Hello friends.
I am a ABAP (SAP programing language) programer and in ABAP we have the concept of "Internal Table".
Internal table is a table resident in memory, not in the Database.
For example, if we want to retrieve from database a list of clients (that are stored in database table KNA1) so that we can use later for any purpose, we do a select to that table and put the data into an Internal Table....afterwards when we need to access this data, instead of reading the database again, we read this Internal Table from memory. This is a way of reducing database reads and increase performance.
The access to the Internal Table is almos the same as to a Database Table. To a database table we do "SELECT *" or "SELECT SINGLE" to read several or just one record, and to an Internal we do "LOOP AT" or "READ TABLE" to read several or just one record.
My question is...is there anything like this in Visual Basic ?
Thank you all for reading and I'll be waiting for your answers ;),
Bleeding_me
Re: Working with data question
Visual Basic is not a database engine, so the question should really be: does "this particular type of database engine" have this function?
For SQL Server, you really have 2 options.
1. Use global temp tables with "create ##MyTempTableName
Global temporary tables (CREATE TABLE ##t) are visible to everyone, and are deleted when all connections that have referenced them have closed.
2. Create a table in Temp database
Tempdb permanent tables (USE tempdb CREATE TABLE t) are visible to everyone, and are deleted when the server is restarted.
Re: Working with data question
SQL Server has a thrid option - table variables:
Code:
DECLARE @tempTabl table (
Field1 int,
Field2 nvarchar(10)
)
From there you can use it like any other "table" ... insert into it, select from it, update, etc...
-tg
Re: Working with data question
Thank you all for your answers :)