Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. New to VBScript

New to VBScript

Scheduled Pinned Locked Moved Web Development
questiondatabasesecurityhelp
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    I am new to VBScript and i have a problem in getting the application path to set the database path(like app.path) Data Source=C:\WINDOWS\Desktop\DataBase\collection.mdb; Persist Security Info=False" Here instead of giving the whole path how can i get the path???:confused:

    C 1 Reply Last reply
    0
    • A Anonymous

      I am new to VBScript and i have a problem in getting the application path to set the database path(like app.path) Data Source=C:\WINDOWS\Desktop\DataBase\collection.mdb; Persist Security Info=False" Here instead of giving the whole path how can i get the path???:confused:

      C Offline
      C Offline
      Chris Rickard
      wrote on last edited by
      #2

      Server.MapPath(_RelativePath_) will give the absolute physical path of a relative path (relative to the current ASP page)

      A 1 Reply Last reply
      0
      • C Chris Rickard

        Server.MapPath(_RelativePath_) will give the absolute physical path of a relative path (relative to the current ASP page)

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        Thanks will it work with VBScript? And will you suggest VBScript for databases??? Are there any disadvantages with VBScript

        C 1 Reply Last reply
        0
        • A Anonymous

          Thanks will it work with VBScript? And will you suggest VBScript for databases??? Are there any disadvantages with VBScript

          C Offline
          C Offline
          Chris Rickard
          wrote on last edited by
          #4

          It will work if this is an ASP page. If you're trying this by running a .vbs file from your desktop it won't because you're using WSH. Again if you're running Server-Side Web pages (I'm assuming this since this is the ASP, ASP.NET forum) VBScript is about the easiest way to go. If this is a desktop app you'll get better performance running full VB. Of course if possible I'd recommend using .NET.

          A 1 Reply Last reply
          0
          • C Chris Rickard

            It will work if this is an ASP page. If you're trying this by running a .vbs file from your desktop it won't because you're using WSH. Again if you're running Server-Side Web pages (I'm assuming this since this is the ASP, ASP.NET forum) VBScript is about the easiest way to go. If this is a desktop app you'll get better performance running full VB. Of course if possible I'd recommend using .NET.

            A Offline
            A Offline
            Anonymous
            wrote on last edited by
            #5

            i have a doubt, i mean can i use VBscript(without ASP) for client side scripting keeping the database on the server I mean can i access the database on the server from a client machine by VBScript alone on an HTML page

            C 1 Reply Last reply
            0
            • A Anonymous

              i have a doubt, i mean can i use VBscript(without ASP) for client side scripting keeping the database on the server I mean can i access the database on the server from a client machine by VBScript alone on an HTML page

              C Offline
              C Offline
              Chris Rickard
              wrote on last edited by
              #6

              Sure you could do it. There are limitations, though. For one thing ADO objects are unsafe so the user will have to lower their Internet Security. Also you'll have to make sure that the user has an adequate MDAC installed. Also there are no objects like Server available to resolve your names. If you're using Access, you have to use physical file paths. (Either Map a drive or use UNC (\\) notation) as it needs Read/Write file permissions to work (and doesn't work over WebDav like other office programs will). Lastly the network connections ADO makes won't run over most firewalls. So if you're dealing with a local Intranet Scenario where you have tight control over the client the answer is yes. If not the answer is a practical no. (Its possible, but way too much work to be worth it).

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups