BC30188 Declaration Expected

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!!!
 
F

Fraggle

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,252
Latest member
MeredithPl

Latest Threads

Top