hi

i currently have an ini file with a list of column header in it.

here is the code i use to read the ini file

Code:
Private Function ReadRepoHeadingini()

On Error GoTo ReadRepoHeadingIni_Error

Dim sError As String, sMinutes As String

sError = ""



SErrorFilePath = GetVBPrivateProfileString$("SETTINGS", "REPO_CB_HEading", "Error", OPXSYS$ + "\RepoHeading.INI")

If (SErrorFilePath = "Error") Then

sError = "File Path, "

End If





If (Trim(sError) <> "") Then

MsgBox "Error reading RepoHeading.INI : " & _

sError + ".", vbOKOnly + vbExclamation

End If

ReadRepoHeadingIni_Exit:

Exit Function

ReadRepoHeadingIni_Error:

ErrorRoutine$ = "ReadRepoHeadingIni"

Gerr Err

End

End Function

so what i have is code to reading information from a databse to a text file.

here is the code

Code:
Private Sub CB_REPO()

On Error GoTo CB_REPOErr

Cmd$ = "SELECT * " + CRLF$

Cmd$ = Cmd$ + " FROM CB_REPO" + CRLF$

Cmd$ = Cmd$ + " SAVE TO " + OPXCOM$ + "\CB_REPO.txt DELIMITED;"

DBCALL "SELECT", "CB_REPO", Cmd$

result = 0







' Dim s As String

' s = "Repo_Type|Collateral_ID|Triparty_Flag|Short_Cover"

' Dim sArr() As String

' sArr() = Split(s, "|")



Exit Sub

CB_REPOErr:

ErrorRoutine$ = "CB_REPO"

Gerr Err

End Sub
and what i need to to is get the column header names from the ini file and put them into the text file with the info from datbase under each column name and ideas how this can me done