Re: How to put query in database?
Hi Wim,
Can you only try this (I am not sure if it is direct the solution)
But than we can see it it connects.[color=blue]
> Dim connection1 As OleDb.OleDbConn ection = _[/color]
New OleDb.OleDbConn ection(Connecti onstring)[color=blue]
>
> Dim command1 As OleDb.OleDbComm and = New OleDb.OleDbComm and("Select * from
> import")[/color]
-Delete rows above
[color=blue]
> command1.Comman dType = CommandType.Tex t[/color]
-Delete row above
dim conn as New OleDbConnection ("Provider=Micr osoft.Jet.OLEDB .4.0;Data
Source=C:\backu p Compaq MV500\TAGS\Acce ss\2003.mdb;")
Dim OleDbDataAdapte r1 As OleDb.OleDbData Adapter = _
New OleDb.OleDbData Adapter("Select * from import",conn)
dim ds as new dataset
Try
OleDbDataAdapte r1.Fill(ds)[color=blue]
>
> connection1.Ope n()[/color]
-Delete row above
[color=blue]
> Catch ex As Exception
>
> txtError.Text = ex.Message & vbCrLf
>
> txtError.Text = txtError.Text & ex.StackTrace
>
> End Try[/color]
Hi Wim,
Can you only try this (I am not sure if it is direct the solution)
But than we can see it it connects.[color=blue]
> Dim connection1 As OleDb.OleDbConn ection = _[/color]
New OleDb.OleDbConn ection(Connecti onstring)[color=blue]
>
> Dim command1 As OleDb.OleDbComm and = New OleDb.OleDbComm and("Select * from
> import")[/color]
-Delete rows above
[color=blue]
> command1.Comman dType = CommandType.Tex t[/color]
-Delete row above
dim conn as New OleDbConnection ("Provider=Micr osoft.Jet.OLEDB .4.0;Data
Source=C:\backu p Compaq MV500\TAGS\Acce ss\2003.mdb;")
Dim OleDbDataAdapte r1 As OleDb.OleDbData Adapter = _
New OleDb.OleDbData Adapter("Select * from import",conn)
dim ds as new dataset
Try
OleDbDataAdapte r1.Fill(ds)[color=blue]
>
> connection1.Ope n()[/color]
-Delete row above
[color=blue]
> Catch ex As Exception
>
> txtError.Text = ex.Message & vbCrLf
>
> txtError.Text = txtError.Text & ex.StackTrace
>
> End Try[/color]
Comment