BC30188 Declaration Expected

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ammar_ace

    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.OLE DB.Connection()
    ..
    ..
    ..

    'obtain connection string
    objconn.Connect ionString = "c:\inetpub\dat abases\test.mdb "

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

    #2
    Re: BC30188 Declaration Expected

    mr_nur2000@yaho o.com (Ammar_ace) wrote in message news:<e2864e02. 0307300816.4c10 f65d@posting.go ogle.com>...
    [color=blue]
    > 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.OLE DB.Connection()
    > .
    > .
    > .
    >
    > 'obtain connection string
    > objconn.Connect ionString = "c:\inetpub\dat abases\test.mdb "
    >
    > And this last line is what is generating error. Help!!![/color]

    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(sende r As Object, e As EventArgs)
    'Code here
    'Code here
    'Code here
    End Sub

    'no Code ever here!

    </script>

    hope that helps

    Fragg

    Comment

    Working...