Hi Steven,
It would be a hell of a job to find the name of that already opened
connection.
But as far as I know you can use more connections in one program.
You need a connection string.
You find it in that initialize part, but you can also look here
http://www.connectionstrings.com/
And then that code in the end yes and all comments I placed between.
I should then not know why it would not work
But if not message, but your problem is simple for me, maybe I made a typeo
somewhere.
Cor
> The connection is opened here and is used for other
> INSERT, UPDATE & DELETE commands elsewhere in the
> application so it must remain live
>
> \\\
> Public Sub New()
> MyBase.New()
>
> 'This call is required by the Windows Form
> Designer.
> InitializeComponent()
>
> 'Add any initialization after the
> InitializeComponent() call
> OleDbConnection1.Open()
> End Sub
> ///
>
>
>
> I added messages to the catch statements and this one is
> always thrown:
Because there is no connection yes.
>
> \\\
> Catch oledbExceptionparameter As
> System.Data.OleDb.OleDbException
> MessageBox.Show
> ("System.Data.OleDb.OleDbException")
> ///
>
> But my grid still does not show any results
>
>
> To use your method I should replace:
>
> \\\
> OleDbDataAdapterCustomersOrders.Fill
> (DataSetCustomersOrders)
> ///
>
> with
>
> \\\
dim connectionstring as string = "the founded connectionstring"
dim sqlStr = "that created sql string of you"
> Dim Conn As New OleDbConnection(connectionstring)
> Try
> Dim cmd As New OleDbCommand(sqlStr, Conn)
> Dim ds As New DataSet
> Dim da As New OleDbDataAdapter(cmd)
> da.Fill(ds, "table")
here the right datasetname and table name (the table name is not really
necassery)
> ///
>
>
Cor