Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


creating variables dynamically

BTGBTG Member Posts: 2
Hi ppl,

I am using a 2 dimensional array of type DOUBLE to store some data, which i am reading from a TEXT File. Now in a single Line in the Text File, i will have to get the First 4 or 5 characters and i'll hav 2 search through the ACCESS Database, to check whether that Particular String of data is existing in any of the record. If it is found, then i'll have to create a variable dynamically with the First 2 Characters of the Corresponding Field Name from the Database and then combine it with some other standard string to store that String from the Text File into the Dynamically created variable. And subsequently as the text file is searched fully and the match is occuring more than once, then the contents in that variable should keep on adding. I don't want 2 HARDCODE the Variable Name, Because then i'll end up with Declaring 700 variables.

Say for example if the 1st 2 characters of the Field Name is "CH" and some standard string is "data" and the Array size declaration is (2, index of that particular field in that table).So my variable name should look something like

chdata(2,3) and it should hold a Data of Type DOUBLE.

Is this Possible? If so, Can somebody explain in detail?

If you have a sample Code, it will b most useful.

Sign In or Register to comment.