Joseph Watson wrote:
>
> Here is my VB code:
>
> Private Sub Command5_Click()
>
> Dim FSEInfo As Workspace
> Dim conn As Connection
If I remove the above line(Connection), the following
seems to work though I don't understand the reason.
regards,
Hiroshi Inoue
> Dim connstring As String
>
> connstring = "ODBC;DSN=FSE Info;"
>
> Set FSEInfo = CreateWorkspace("FSE_Info_ws", txtUser, txtPassword,
> dbUseODBC)
>
> Set conn = FSEInfo.OpenConnection("FSE_Info_cnn",
> dbDriverCompleteRequired, False, connstring)
>
> conn.Close
>
> FSEInfo.Close
>
> End Sub
>
> The error occurs on the "Set Conn" line, and reads:
>
> Run-time error '13':
>
> "type mismatch"