Thanks, Dave. I think this piece is clear to me now.
"Dave Patrick" <DSPatrick[ at ]nospam.gmail.com> wrote in message news:eiayCr6JGHA.1192[ at ]TK2MSFTNGP11.phx.gbl...
[Quoted Text] > No you don't need two of them. You'll only need; > Remember to always close whatever you open. > > Dim cnn As adodb.Connection > > Set cnn = CurrentProject.Connection > cnn.Execute sqlMySQL$ > cnn.Close > -- > > Regards, > > Dave Patrick ....Please no email replies - reply in newsgroup. > Microsoft Certified Professional > Microsoft MVP [Windows] > http://www.microsoft.com/protect> > "GY2" wrote: > | Thanks for you help. > | > | Yes, your suggestion works fine but if I've already got an open > connection > | is it bad form to simply use that one instead of opening two of them? > | > | Dim rs1 As adodb.recordset > | Dim cnn As adodb.Connection > | 'Dim dbMyDB As adodb.Connection Do I need this one as well? > | > | Set rs1 = New adodb.recordset > | Set cnn = CurrentProject.Connection > | 'Set dbMyDB = CurrentProject.Connection > | > | rs1.Open "tblWhatever", cnn > | > | 'dbMyDB.Execute sqlMySQL$ > | cnn.Execute sqlMySQL$ > >
|