BC30188 Declaration Expected

  • Thread starter Thread starter Ammar_ace
  • Start date Start date
A

Ammar_ace

Can Somebbody pls help me out here. i am new to .net programming, i am
trying to connect to an access database and read, but i get the error
message 'BC30188 Declaration Expected'
this is what i did

'create the connection object
Dim objConn As New System.Data.OLEDB.Connection()
..
..
..

'obtain connection string
objconn.ConnectionString = "c:\inetpub\databases\test.mdb"

And this last line is what is generating error. Help!!!
 
Can Somebbody pls help me out here. i am new to .net programming, i am
trying to connect to an access database and read, but i get the error
message 'BC30188 Declaration Expected'
this is what i did

'create the connection object
Dim objConn As New System.Data.OLEDB.Connection()
.
.
.

'obtain connection string
objconn.ConnectionString = "c:\inetpub\databases\test.mdb"

And this last line is what is generating error. Help!!!

Is all your code between the <script runat="server"> </script> tags?
and is it all within subs or functions?

A dummy bit of code may look like this ..

<script runat="server">

'no Code ever here!

Sub Page_Load(sender As Object, e As EventArgs)
'Code here
'Code here
'Code here
End Sub

'no Code ever here!

</script>

hope that helps

Fragg
 
Back
Top