473,386 Members | 1,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

BC30188 Declaration Expected

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
1 16333
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: TJS | last post by:
trying to display pdf file in browser fails on this line: Response.ContentType = "application/pdf" getting an error about no declaration found for "response" what declaration is needed ???
9
by: D. Shane Fowlkes | last post by:
Still learning ASP.NET....(and I was getting so good with classic ASP too!). I'm trying to connect to a SQL Server using a simple connection script. I've checked 2 different books and looked at...
2
by: Simon Harris | last post by:
Hi All, I have a page which I want to accept an ID on the querystring - I'm trying to get this ID into a hidden form field. I have the following code at the top of my page: Line 5: <script...
1
by: Chuck Insight | last post by:
Another newbie question. While working on a WEB project, I came across some code that looked promising, but retues an error. The code is: Private Sub Form_Load() The error it produced is: ...
3
by: rdi | last post by:
The import statements weren't copy/pasted, but everything INSIDE the class WAS copy pasted from the help file. Starting with the myMail.From line and going down to the SmtpMail.Send line, EVERY line...
3
by: Steve King | last post by:
I've an error in code I got from a walkthrough that should work just fine. I added a reference to DMO that shows up in the references properly. The Dim line shows no errors but the initialized...
2
by: phil | last post by:
Hi, When executing this (asp.net 2.0), i get the error: Compiler Error Message: BC30188: Declaration expected. Line 9: Dim dtreader As SqlDataReader Line 10: Line 11: db = new...
1
by: Cirene | last post by:
I'm binding a datagrid to my business object. I get an error that the type 'abcshoppingcart'...is not marked as serializable. So, I added a attribute in the class. But then a blue squiggly...
1
by: Stevecb | last post by:
Hello I'm getting the error "Declaration expected" twice in this code... 'Required in all cases when calling API functions Imports System.Runtime.InteropServices 'Required in this example and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.