VB Windows Application and remote Database?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • James W. Hall Sr.

    #1

    VB Windows Application and remote Database?


    I have a windows application written in VB 6.0 and Microsoft Access. I
    have 4 customers using it. One of my customers has set up two offices.
    I have a way of putting the Access database on my webserver. Can I
    access the Access database from my windows app?

    I put a lot of time into this app and would rather add features to it
    then rebuild. My customers are very happy with the application. I just
    don't have a lot of experience with remote databases. I don't want to
    use citrix or set up a vpn. These are small offices.

    James W. Hall Sr.
    jhall@alpha-transportation. com

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
  • Wayne  Wengert

    #2
    Re: VB Windows Application and remote Database?

    Consider converting to SQL Server. You can buy a SQL Server service from
    several different ISPs (about $25/mo). With your data out there your users
    can access it from Web apps or Windows apps.

    HTH

    Wayne

    "James W. Hall Sr." <jhall@alpha-transportation. com> wrote in message
    news:uuqLfpQYDH A.2464@TK2MSFTN GP09.phx.gbl...[color=blue]
    >
    > I have a windows application written in VB 6.0 and Microsoft Access. I
    > have 4 customers using it. One of my customers has set up two offices.
    > I have a way of putting the Access database on my webserver. Can I
    > access the Access database from my windows app?
    >
    > I put a lot of time into this app and would rather add features to it
    > then rebuild. My customers are very happy with the application. I just
    > don't have a lot of experience with remote databases. I don't want to
    > use citrix or set up a vpn. These are small offices.
    >
    > James W. Hall Sr.
    > jhall@alpha-transportation. com
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it![/color]


    Comment

    • James W. Hall Sr.

      #3
      Re: VB Windows Application and remote Database?

      I have the service already. my question is, what is the best way to
      connect my windows app to the database at my ISP?

      James W. Hall Sr.
      jhall@alpha-transportation. com

      *** Sent via Developersdex http://www.developersdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      • Wayne  Wengert

        #4
        Re: VB Windows Application and remote Database?

        Just create a normal SQL connection - for example:

        Dim cst As String
        Set myConn = New ADODB.Connectio n
        cst = "Provider=SQLOL EDB; Data Source = 63.209.100.190; Initial Catalog
        = myDB; User ID = myID; Password=myPW"
        myConn.Open cst

        Wayne

        "James W. Hall Sr." <jhall@alpha-transportation. com> wrote in message
        news:uWn5cRZYDH A.440@tk2msftng p13.phx.gbl...[color=blue]
        > I have the service already. my question is, what is the best way to
        > connect my windows app to the database at my ISP?
        >
        > James W. Hall Sr.
        > jhall@alpha-transportation. com
        >
        > *** Sent via Developersdex http://www.developersdex.com ***
        > Don't just participate in USENET...get rewarded for it![/color]


        Comment

        • James W. Hall Sr.

          #5
          Re: VB Windows Application and remote Database?


          Thanks, Wayne.

          I'll give it a go. My thoughts were that it was more difficult than
          just creating the SQL connection. Thanks again.

          James W. Hall Sr.
          jhall@alpha-transportation. com

          *** Sent via Developersdex http://www.developersdex.com ***
          Don't just participate in USENET...get rewarded for it!

          Comment

          • Wayne  Wengert

            #6
            Re: VB Windows Application and remote Database?

            When I switched to SQL Server I was surprised at how smooth it was. I love
            it!

            Wayne

            p.s. Good luck on your project.

            "James W. Hall Sr." <jhall@alpha-transportation. com> wrote in message
            news:uWeuntZYDH A.2236@TK2MSFTN GP10.phx.gbl...[color=blue]
            >
            > Thanks, Wayne.
            >
            > I'll give it a go. My thoughts were that it was more difficult than
            > just creating the SQL connection. Thanks again.
            >
            > James W. Hall Sr.
            > jhall@alpha-transportation. com
            >
            > *** Sent via Developersdex http://www.developersdex.com ***
            > Don't just participate in USENET...get rewarded for it![/color]


            Comment

            • James W. Hall Sr.

              #7
              Re: VB Windows Application and remote Database?

              Wayne,

              I have switched to SQL SERVER. I have a database at my ISP and
              they have created a DSN for me called alphadispatch. I'm having trouble
              understanding the connection string for "Data Source =" and "Initial
              Catalog ="

              Stupid question. How does the connection string find the DSN at my
              ISP? Remember I am running this from a VB standard exe.

              James W. Hall Sr.
              jhall@alpha-transportation. com

              *** Sent via Developersdex http://www.developersdex.com ***
              Don't just participate in USENET...get rewarded for it!

              Comment

              • Wayne  Wengert

                #8
                Re: VB Windows Application and remote Database?

                I found that trying to get DSNs setup on a service like this was difficult
                and/or not supported. I just use a complete connection string in my
                application. Such as:

                Dim cst As String
                Set myConn = New ADODB.Connectio n
                cst = "Provider=SQLOL EDB; Data Source = 63.209.100.190; Initial Catalog
                = myDB; User ID = myID; Password=myPW"
                myConn.Open cst

                Change Data Source to the IP addr or name (e.g. SQLService.com) and then
                plug in the name of your DB and the login ID and password.

                Wayne

                "James W. Hall Sr." <jhall@alpha-transportation. com> wrote in message
                news:e5onP0qfDH A.1648@TK2MSFTN GP09.phx.gbl...[color=blue]
                > Wayne,
                >
                > I have switched to SQL SERVER. I have a database at my ISP and
                > they have created a DSN for me called alphadispatch. I'm having trouble
                > understanding the connection string for "Data Source =" and "Initial
                > Catalog ="
                >
                > Stupid question. How does the connection string find the DSN at my
                > ISP? Remember I am running this from a VB standard exe.
                >
                > James W. Hall Sr.
                > jhall@alpha-transportation. com
                >
                > *** Sent via Developersdex http://www.developersdex.com ***
                > Don't just participate in USENET...get rewarded for it![/color]


                Comment

                • James W. Hall Sr.

                  #9
                  Re: VB Windows Application and remote Database?

                  Wayne,

                  I have the connection string setup and I had the service setup a DSN
                  for me. I am still getting a Run Time Error -2147012867 Internet Client
                  Error - Cannot Connect to Server.

                  Am I missing anything? Do I need to load IIS or something? I am
                  going to contact the ISP this morning.

                  Using this code:

                  Dim rsgeneric As Recordset
                  Dim cnngeneric As Connection
                  Set cnngeneric = New Connection
                  cnngeneric.Open "provider=m s remote;" _
                  & "Remote Provider = MSDataShape;" _
                  & "Remote Server=http://100.70.160.178; " _
                  & "Data Source=dispatch ;" _
                  & "User Id=dispatch; Password=test"
                  ' Changed the connection, username and password to test info.
                  Set rsgeneric = New Recordset
                  Dim strquery As String
                  strquery = "select * from sysusers"
                  rsgeneric.Sourc e = strquery
                  Set rsgeneric.Activ eConnection = cnngeneric
                  rsgeneric.Open
                  Do While rsgeneric.EOF = False
                  Debug.Print rsgeneric(0)
                  rsgeneric.MoveN ext
                  Loop
                  rsgeneric.Close
                  cnngeneric.Clos e


                  James W. Hall Sr.
                  jhall@alpha-transportation. com

                  *** Sent via Developersdex http://www.developersdex.com ***
                  Don't just participate in USENET...get rewarded for it!

                  Comment

                  Working...