Declaration Expected

  • Thread starter Thread starter Simon Harris
  • Start date Start date
S

Simon Harris

Hi All,

I'm trying to the the following code working in VS.Net, when I add the lines
noted with '<<<<<' VS tells me declaration is expected for
'SPDOleDbConnection'

Public Class DBConnect
Dim configurationAppSettings As System.Configuration.AppSettingsReader =
New System.Configuration.AppSettingsReader
Dim SPDOleDbConnection As New OleDb.OleDbConnection
SPDOleDbConnection.ConnectionString =
CType(configurationAppSettings.GetValue("OleDbConnection1.ConnectionString",
GetType(System.String)), String) <<<<<
SPDOleDbConnection.Open() <<<<<
Dim OleDbCommand As New OleDb.OleDbCommand
End Class

AFAIK, if I've declared SPDOleDbConnection, then I can reference its
properties on subsequent lines?

Regards,
Simon.
 
Sorry - Should have mentioned that the code is not complete yet, just having
problems on the lines marked.
 
Back
Top