newbie needs your advice vb5.0 
Author Message
 newbie needs your advice vb5.0

I am suppose to read a text file into a temporary database, checking the
values from a lookup table and then append a SQL 6.5 database table with
the verified results.

I just came from foxpro 2.6 and 6.0.

Does vb5.0 have a copy structure function or should I build the temp file
by code or make it a dynaset?

Does vb5.0 have and append from ascii function or should I treat the text
file as a random access file ( can that be done, I understand that random
access is fixed length fields). Does it matter if each record ends in a lf
and cr?

Thanks for the help
Jim



Tue, 13 Nov 2001 03:00:00 GMT  
 newbie needs your advice vb5.0


Quote:
>I am suppose to read a text file into a temporary database, checking the
>values from a lookup table and then append a SQL 6.5 database table with
>the verified results.

>I just came from foxpro 2.6 and 6.0.

>Does vb5.0 have a copy structure function or should I build the temp file
>by code or make it a dynaset?

>Does vb5.0 have and append from ascii function or should I treat the text
>file as a random access file ( can that be done, I understand that random
>access is fixed length fields). Does it matter if each record ends in a lf
>and cr?

>Thanks for the help
>Jim

I am not completely sure what you want to do but if you want to bring a text
file into a database and append it to another table the easiest way to do it
is to use a macro to transfer the data into a new table and then create an
append query to attach that table to the other one and have the macro call
the query.  This is the easiest way if you don't have any VBA knowledge.

~HTH Rob



Tue, 13 Nov 2001 03:00:00 GMT  
 newbie needs your advice vb5.0
You can use a sql statement to create the table:

Create Table Temp1 as select * from table1 where 1 = 0

I'm not sure if that works in SQL Server but you could also try this syntax:

select * from table1 into temp1 where 1 = 0

the 1 = 0 makes sure you dont get any data - just the structure.

To append the file into the table I would just loop through each record and
parse out the different fields.   Once you have the data in variables you
can dynamically create a insert sql statement  to insert the data.

Chuck McMahon


Quote:
>I am suppose to read a text file into a temporary database, checking the
>values from a lookup table and then append a SQL 6.5 database table with
>the verified results.

>I just came from foxpro 2.6 and 6.0.

>Does vb5.0 have a copy structure function or should I build the temp file
>by code or make it a dynaset?

>Does vb5.0 have and append from ascii function or should I treat the text
>file as a random access file ( can that be done, I understand that random
>access is fixed length fields). Does it matter if each record ends in a lf
>and cr?

>Thanks for the help
>Jim



Tue, 13 Nov 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Newbie Needs Advice For Purchase

2. Newbie needs advice on project

3. Need newbie advice please

4. Client / Server newbie needs some advice

5. Newbie Needs Your Advice

6. Newbie needs advice

7. Newbie: need some advice

8. need advice on making modem throughput meter (newbie)

9. Newbie needs advice on scope

10. Newbie needs advice

11. Newbie Needs Advice

12. Access & VB5 / 6 - Advice needed

 

 
Powered by phpBB® Forum Software