1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
Dim conn As New OracleConnection(oradb)
Dim cmd As New OracleCommand
cmd.Connection = conn
cmd.CommandText = "SELECT PR_CLIENT FROM COTE.PRETS"
cmd.CommandType = CommandType.Text
'Dim LaRequete As String
Dim sdaRequetes As New OracleDataAdapter
sdaRequetes.SelectCommand = cmd
Dim dsRequete As New DataSet
Try
conn.Open()
sdaRequetes.Fill(dsRequete, "TOTO")
conn.Dispose()
Catch ex As OracleException
End Try
Dim a As Integer
'Dim element As New DataTable
Dim entetePrets As String = readParamSql("enteteprets")
Dim entete() As String
entete = Split(entetePrets, ";")
'**recuperation des données du dataset
Dim fs As New System.IO.FileStream(Me.TextBoxFichier3D.Text, IO.FileMode.Create, IO.FileAccess.Write)
Dim sw As New System.IO.StreamWriter(fs)
For a = 0 To dsRequete.Tables(0).Rows.Count - 1
'MsgBox(dsRequete.Tables("COTE.PRETS").Rows(a).Item("PR_CLIENT"))
For i As Integer = 0 To entete.LongLength - 1 'element.Rows.Count - 1
sw.Write(dsRequete.Tables("TOTO").Rows(a).Item(entete(i)) & vbCrLf) '.Item("PR_CLIENT"))
Next
Next
MsgBox("ok") |
Partager