Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Export data from SQL table useing VB in VS

Author  Topic 

Piplfox
Starting Member

1 Post

Posted - 2011-09-17 : 08:03:51
Hi, I am beginer in programing so please go easy on me with advance codeing.
I made an simple application with 2 relation SQL tables. One is for user date (user_T), and second employer data(employer_T). I made an form that combine all three tables and I can enter delete an edit data, I also made report that show those datas. But now I have proble and dont know where to begin with next quest. I want to print/export data from those tables in txt file but in special order.
Data from tables that I want to print/expot look like this:

Table 1:UserID, UserName, UserAddress, CashCredits, ReportDate
Table 2:EmployerID, EmployerName, EmployerAddress

and from that I need to generate txt file. File PLddmmgg.* must contain the following record types:

PLddmmgg.* FILE FORMAT DESCRIPTION
File PLddmmgg.* must contain the following record types:
-summary header record
-data record.

Each record type (field: Record Type) has a header field that identifies the type of record in the length of 3 digits in the following sequence:
a) summary header record – number 030
b) data record – number 031

The record A contain 80 characters (bytes)

FILE STRUCTURE
The file structure is based on the txt (ASCII) format code page 1250.

SUMMARY HEADER RECORD (030)

Field Description----------Length-Type-From-To-Values/symbols entered
Record type----------------3------N----1----3--030
Empty (zeros)--------------7------N----3----10-0000000
Report Date----------------6------N----10---16-Date (DDMMGG)
User Name------------------20-----N----16---36-Alfanumerical max char 20
<CR><LF>-------------------2-----------80---82

DATA RECORD (031)

Field Description----------Length-Type-From-To-Values/symbols entered
Record type----------------3------N----1----3--031
Empty (zeros)--------------7------N----3----10-0000000
Daily reference number-----6------N----10---16-Number or zeros (optional)
Employer Name--------------20-----N----16---36-Alfanumerical max char 20
CashCredits----------------13-----N----36---49-Eleven whole spaces and two decimals, no delimiters. Entered to the right with leading zeros.
<CR><LF>-------------------2-----------80---82

Thanks in advance
   

- Advertisement -