By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,152 Members | 1,837 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,152 IT Pros & Developers. It's quick & easy.

BC30188 Declaration Expected

P: n/a
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!!!
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
mr********@yahoo.com (Ammar_ace) wrote in message news:<e2**************************@posting.google. com>...
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
Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.