Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Sep 2006
    Location
    Skopje, Macedonia
    Posts
    100
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Unhappy Error during translation script from language VB to JavaScript

    Code:
    <script runat="server">
    sub Page_Load
    dim dbconn,sql,dbcomm,dbread
    dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;
    data source=" & server.mappath("northwind.mdb"))
    dbconn.Open()
    sql="SELECT * FROM customers"
    dbcomm=New OleDbCommand(sql,dbconn)
    dbread=dbcomm.ExecuteReader()
    customers.DataSource=dbread
    customers.DataBind()
    dbread.Close()
    dbconn.Close()
    end sub
    </script>
    I have problems with the
    Code:
    dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data source=" & server.mappath("northwind.mdb"))
    line, it gives the following error: " ';' expected"
    and I have the ';' everywhere.

    If you have any idea how to translate this script to JavaScript, please tell me!!!

    Thanks in advance!
    Lallo

  • #2
    $object->toCD-R(LP); vinyl-junkie's Avatar
    Join Date
    Jun 2003
    Posts
    3,073
    Thanks
    2
    Thanked 22 Times in 22 Posts
    What you have here is a database connection script. That is server side scripting. Javascript is client side scripting. You can't rewrite this script into javascript.

    Is there more to this than you're telling us? What specific problem are you trying to solve?
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    SNAP to it!

  • #3
    Regular Coder
    Join Date
    Sep 2006
    Location
    Skopje, Macedonia
    Posts
    100
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Problem solved, thanks again!!!!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •