Page 1 of 2 12 LastLast
Results 1 to 40 of 49

Thread: [Newbie] Cloud database on VB6

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2010
    Posts
    250

    Lightbulb [Newbie] Cloud database on VB6

    Hi master/guru/suhu

    Can someone help me explain or recommend me.
    I was asked by friend to create vb6 application (inventory/accounting) and this part I have no problem
    The problem lies when he asked me to make it cloud, so they won't need server to maintain, easy for access, bla bla blah

    I want to make the database in accdb format (Access 2007), what should I do to make this cloud ?

    Thank you
    Very very newbiw for cloud database

    Regards

  2. #2
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,454

    Re: [Newbie] Cloud database on VB6

    If you want to develop the client-frontend (the GUI) in VB6, whilst the Data is
    (in *.mdb or *.accdb format) hosted "on some server in the internet", then
    you will need:

    1) either a "managed-server"-contract with some internet-hoster who offers MS-Windows as the Server-OS
    2) or a CloudService-Provider who offers entire Virtual-Machines (which in the end run MS-Windows as well)

    The latter part (#2) could be e.g. an MS-Azure Worker-Role - but those are usually much more
    expensive than a normal virtual (managed) server from a normal Web-Provider (as listed in point #1).

    To give you an impression, how #1 above performs and behaves - here's VB6-Code
    which can perform SQL-Requests against a Test-Database (NWind.mdb), hosted online
    (on vbRichClient.com - "powered" by a normal "about 10Euro-per-month" Windows-WebHosting-contract).

    To run the code below, you will only need an "MS Hierarchical Flexgrid" on an otherwise empty Form,
    so after you placed the Grid-Control on the Form (as MSHFlexGrid1), you can click the Form and make
    a secure https-Request, which hands out an ADODB.Recordset (which then is set as the datasource of the FlexGrid).

    Code:
    Option Explicit
    
    Private Sub Form_Click()
      On Error GoTo 1
        Set MSHFlexGrid1.DataSource = PerformNwindRequest("Select * From Customers")
    1 If Err Then MsgBox Err.Description
    End Sub
    
    Function PerformNwindRequest(SQL As String) As Object
        Dim Req As Object, B() As Byte
        Set Req = CreateObject("Winhttp.WinHttpRequest.5.1")
            Req.Open "POST", "https://vbRichClient.com/asp/ADODBTest.asp", False
            Req.SetRequestHeader "Content-Type", "application/json"
            Req.Send "{""DBName"": ""/data/NWind.mdb"", ""SQL"": """ & SQL & """}"
        B = Req.ResponseBody
        If B(0) = 123 Then Err.Raise vbObjectError, , StrConv(B, vbUnicode)
        Set PerformNwindRequest = GetRsFromByteContent(B)
    End Function
    
    Function GetRsFromByteContent(Data) As Object
       Dim Stream As Object
       Set Stream = CreateObject("ADODB.Stream")
           Stream.Type = 1 '<- 1 = adTypeBinary
           Stream.Open
           Stream.Write Data
           Stream.Position = 0
       Set GetRsFromByteContent = CreateObject("ADODB.Recordset")
           GetRsFromByteContent.Open Stream
    End Function
    Olaf

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2010
    Posts
    250

    Re: [Newbie] Cloud database on VB6

    great scott..thank you very much

    By the way, for part 1. can you provide clearer example. what host/website/etc that can provide cloud database mdb/accdb ??
    i read before for this : www.xeround.com ?
    can you give me more basic explanation for part 1.. i dont think you refer to IIS or public IP some sort like that ...right ??

  4. #4
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,454

    Re: [Newbie] Cloud database on VB6

    Quote Originally Posted by jedifuk View Post
    By the way, for part 1. can you provide clearer example. what host/website/etc that can provide cloud database mdb/accdb ??
    With the approach in #1, we do talk about a "cloud-service in the classical sense"
    (a normal "WebService", hosted on a normal "WebServer", on a Serverfarm of a normal "InternetProvider").

    The term "cloud" is only an overhyped buzzword with "all kind of meanings" these days.

    "Cloud" (in the plain technical sense) is only an:
    - "accumulation of known web-technologies" (as they are provided by normal InetHosters as well)
    - often under the umbrella of a larger company (which wants to bind you to their own service-contracts and APIs)

    The one thing, which needs to exist in a *real* cloud-service is: Scalability.
    (in terms of a "flexible pricing-model", which allows you to "throw more hardware at the problem with a simple contract-expansion")

    Some of the above mentioned "normal Providers" don't allow such a contract-boost-up in an easy way
    (in case your normal Web-solution starts getting too slow for your "much increased customer-base").

    Ok - to be fair - "real cloud-providers" offer also better failover-mechanisms and a better (smaller)
    "average down-time per year" than the normal WebServer-contracts of normal InetProviders (although
    some normal contracts were getting much better in this regard lately).


    Quote Originally Posted by jedifuk View Post
    can you give me more basic explanation for part 1.. i dont think you refer to IIS or public IP some sort like that ...right ??
    The example above (assuming that it worked for you) is based on #1...

    And this is a normal contract from 1und1 (a german Inet-provider - they also have international offers I think, then under the '1and1' label).
    - it's normal Windows-Hosting
    - running an IIS as the WebServer
    - supporting "classic ASP", which answered the request in the above example (although ASP.Net is also available)
    - the contract has "unlimited Traffic and unlimited WebSpace" (on an SSD-based SAN)
    - and runs on a shared VM which is powered by Intel-XEONs (whereas the cheaper worker-roles in MS-Azure run on slow Intel-Atoms)
    - there's automatic serverside Backups taking place (mirroring to another Serverpark in a different location)
    - the 10Euro per month do also include a single SSL-certificate (which you need for secure https-connections)
    - upgrade-options to the (more expensive) "1and1 real cloud-services" do exist on this contract

    Not trying to advertise 1and1 here - there's comparable offers also from a lot of other providers -
    I mentioned it only with regards to: "what exactly does work well for you"...

    Olaf

  5. #5
    Fanatic Member
    Join Date
    Jan 2015
    Posts
    643

    Re: [Newbie] Cloud database on VB6

    Olaf, this is interesting.

    Is it possible for you to post the ASP code of your "https://vbRichClient.com/asp/ADODBTest.asp"?

    Thanks

  6. #6
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,454

    Re: [Newbie] Cloud database on VB6

    Quote Originally Posted by Thierry69 View Post
    Is it possible for you to post the ASP code of your "https://vbRichClient.com/asp/ADODBTest.asp"?
    Sure, here it is (please google for json2.asp, which was not written by me)...

    Code:
    <% @EnableSessionState=False %>
    <!--#include file="json2.asp"-->
    
    <%
    'Helper-Functions which are normally located in another include-file (similar to the json2.asp at the top)
    Function GetStringFromUTF8Bytes(B)
      With CreateObject("ADODB.Stream")
       .Type = 1
       .Open
       .Write B
       .Position = 0
       .Type = 2
       .Charset = "utf-8"
       GetStringFromUTF8Bytes = .ReadText
      End With
    End Function
    
    Function OpenConn(ServerFileName)
      Set OpenConn = CreateObject("ADODB.Connection")
          OpenConn.CursorLocation = 3 ' adUseClient
          OpenConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & ServerFileName
    End Function
    
    Function GetRs(Query, Cnn)
      Set GetRs = CreateObject("ADODB.Recordset")
      GetRs.Open Query, Cnn, 3, 4 'adOpenStatic, adLockBatchOptimistic
    End Function
    
    Function GetByteContentFromRs(Rs)
       If Not IsObject(Rs) Then
          Set Rs = CreateObject("ADODB.Recordset")
              Rs.Fields.Append "Empty", 8
              Rs.Open
              Rs.AddNew
       End If
       Dim Stream
       Set Stream = CreateObject("ADODB.Stream")
       Rs.Save Stream, 0 '<- 0 = adPersistADTG
       GetByteContentFromRs = Stream.Read(Stream.Size)
    End Function
    
    
    'and here the lines needed to serve the request (making use of the Helper-Functions)
    On Error Resume Next
    Dim Params: Set Params = JSON.parse(GetStringFromUTF8Bytes(Request.BinaryRead(Request.TotalBytes)))
    Dim Cnn:    Set Cnn = OpenConn(Server.MapPath(Params.DBName))
    Dim Rs:     Set Rs  = GetRs(Params.SQL, Cnn)
     
        If Err Then 
          Response.Write "{""Err"": """ & Err.Description & """}" 
        Else
          Response.BinaryWrite GetByteContentFromRs(Rs)
          If Err Then Response.Write "{""Err"": """ & Err.Description & """}"
        End If
    Cnn.Close
    %>
    Olaf

  7. #7
    Fanatic Member
    Join Date
    Jan 2015
    Posts
    643

    Re: [Newbie] Cloud database on VB6

    Thanks.
    I have made it work on one simple DB.
    Very Interesting.

  8. #8
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: [Newbie] Cloud database on VB6

    Before going too far down that road though there are many things to consider.

    From the programmer's point of view the client interaction with the database is quite different. From an operations point of view the hosted part needs some care and feeding and providers go out of business, drop service offerings, change IP addresses making DNS maintenance an issue, etc.

    Nothing wrong with the concept, it has been around almost exactly as shown above since the late 1990s.


    But in real life you'll probably find that things will be far simpler just to install a cheap but solid NAS server on the LAN with a couple of mirrored (RAID 1) drives and call it good. Unless remote access from outside the LAN is truly required this will be far, far less trouble in both the short and the long term.

    Lots of NAS boxes are around, often Linux or BSD based, but they support Microsoft Networking via Samba or some variation. These are typically designed to be near-zero-administration and require no Linux knowledge.

    Such a NAS box with two 1TB drives can be had for under $200 US with some shopping. $300 at worst. Try a Google search on "2 drive nas server" for some options.

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Jan 2010
    Posts
    250

    Re: [Newbie] Cloud database on VB6

    thank you

    now the problem, my friend do not wish physically server, need cloud since no need to worry about maintenance pc, etc.
    So I need a place where I can put database on internet, and vb6 application can access the database.
    I know dropbox and google drive unable to do the job, change 1 byte in database will sync full size mdb to internet

    Any suggestions ??

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Jan 2010
    Posts
    250

    Re: [Newbie] Cloud database on VB6

    one nice question..sorry for newbie question

    Suppose I place my database in google drive, (which means physically database will exist in local harddrive)
    Can I use vb6 to access database and automatically sync every afternoon ??

    thank you

  11. #11
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: [Newbie] Cloud database on VB6

    You have little choice then.

    You could redesign everything to use a proper Cloud platform (and that means you cannot use an ACE or Jet database).

    Or else you might go with a hosted ASP application as already suggested, which still requires a redesign but at least you can still use a Jet MDB or ACE ACCDB.

    I suspect you will find it less work in the long run though to move to a hosted client/server DBMS like SQL Server or MYSQL. The downside is that even to use those with your monolithic application design you have to find a hosting provider that permits client connections from the public Internet. Most hosting providers do not allow this, but some do.

    So those are your three options if your friend insists on this requirement: massive rewrite, significant rewrite, or move to a client/server DBMS on a remote host allowing client connections.

    Very few people ever take the first path with VB6. These days very few take the second path using ASP. Almost everyone either tries the third path or gives up and installs a file server on their LAN.

  12. #12
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: [Newbie] Cloud database on VB6

    Quote Originally Posted by jedifuk View Post
    one nice question..sorry for newbie question

    Suppose I place my database in google drive, (which means physically database will exist in local harddrive)
    Can I use vb6 to access database and automatically sync every afternoon ??

    thank you
    File sharing and sync services are not intended to be used for something like a database. Even if you get it to work, a small update to a database could mean a massive synchronization.

    Nobody does this.

  13. #13

    Thread Starter
    Addicted Member
    Join Date
    Jan 2010
    Posts
    250

    Re: [Newbie] Cloud database on VB6

    okay..good explanation, no problem I can migrate to MySQL cloud, I only need to change connection string in vb6
    Now, my stupid questions :
    1. Can someone recommend me what Cloud storage suitable for this job (MySQL, etc) with friendly price ?
    2. My vb6 application will access this cloud storage..using public IP ?? that will need some work right ??

    Regards

  14. #14

    Thread Starter
    Addicted Member
    Join Date
    Jan 2010
    Posts
    250

    Re: [Newbie] Cloud database on VB6

    Quote Originally Posted by dilettante View Post
    File sharing and sync services are not intended to be used for something like a database. Even if you get it to work, a small update to a database could mean a massive synchronization.

    Nobody does this.
    yes..that is what i am talking about
    small update results in massive sync

    Can someone recommend me what place I can put my database on internet (cloud is the easy language) so when I made small update I won't need to full sync

    regards

  15. #15

    Thread Starter
    Addicted Member
    Join Date
    Jan 2010
    Posts
    250

    Re: [Newbie] Cloud database on VB6

    i read something about google cloud platform..
    with hosting ability, video streaming, etc

    Can I use this ??

  16. #16
    Fanatic Member
    Join Date
    Jan 2015
    Posts
    643

    Re: [Newbie] Cloud database on VB6

    dilettante is right, doing this way with access DB is not the best practice.
    But it could be used to export data to an external DB, then be reused with a light offsite consultation client.

    Using dropbox or similar is not at all the good way to do it too as it will sync all the data.

  17. #17

    Thread Starter
    Addicted Member
    Join Date
    Jan 2010
    Posts
    250

    Re: [Newbie] Cloud database on VB6

    anyone can explain ...how about google cloud SQL ??

    is that good enough to solve my problem ?

  18. #18
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: [Newbie] Cloud database on VB6

    Google Cloud SQL should get you started. Let us know how that turns out for you.

  19. #19
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,229

    Re: [Newbie] Cloud database on VB6

    Using VB6 from a Cloud MySQL instance isn't as simple as changing the connection string. As dil pointed out - on most shared instances, you won't have direct port access to the DB. you'll need a "service" similar to the ASP Schmidt posted.

  20. #20

    Thread Starter
    Addicted Member
    Join Date
    Jan 2010
    Posts
    250

    Re: [Newbie] Cloud database on VB6

    Quote Originally Posted by DEXWERX View Post
    Using VB6 from a Cloud MySQL instance isn't as simple as changing the connection string. As dil pointed out - on most shared instances, you won't have direct port access to the DB. you'll need a "service" similar to the ASP Schmidt posted.
    i see..then what is the easiest way to connect to online database by using vb6 ?? no problem with db type, i can live with MySQL, Mdb, Accdb, etc.

  21. #21
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,229

    Re: [Newbie] Cloud database on VB6

    Schmidt actually posted the easiest. The easiest however is just not what most of use would do The example service Schmidt posted leaves the entire DB open to the internet (it is just an example). so you'll probably want a little more security than completely wide open.

    You could use Schmidt's example as a starting point and create a more specific and secured web api.
    It actually all depends on where you want to host the data. Some generic shared servers may not even have ASP, or a shared windows environment.
    price out your options, and see what they offer. I bet if you're willing to shell out the big bucks - you can have a windows server with the ports you need open to the internet. (then it is just a connection string update)

  22. #22

    Thread Starter
    Addicted Member
    Join Date
    Jan 2010
    Posts
    250

    Re: [Newbie] Cloud database on VB6

    Quote Originally Posted by DEXWERX View Post
    Schmidt actually posted the easiest. The easiest however is just not what most of use would do The example service Schmidt posted leaves the entire DB open to the internet (it is just an example). so you'll probably want a little more security than completely wide open.

    You could use Schmidt's example as a starting point and create a more specific and secured web api.
    It actually all depends on where you want to host the data. Some generic shared servers may not even have ASP, or a shared windows environment.
    price out your options, and see what they offer. I bet if you're willing to shell out the big bucks - you can have a windows server with the ports you need open to the internet. (then it is just a connection string update)
    Thank you..i think i am getting picture about this subject..
    I might take a look at 1and1..but i think i couldnt try for free. You know. I need to try before i proceed with pricing terms
    Sorry. Maybe this out of question. Can someone recommend me which host give free trial ?
    Again. Sorry for asking this

  23. #23
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: [Newbie] Cloud database on VB6

    If you want to go with the ASP alternative you can just install IIS locally. Then you'll probably have to install and enable ASP on that because by default you probably only get ASP.Net these days. That gives you something to play with.

    I think you will very quickly figure out that you don't want to go that way at all! The example shown above is about the most trivial thing imaginable: querying and returning a disconnected Recordset. Dealing with updating and more complex operations is a lot of work, often enough that it quickly begins to make sense to start moving logic out of your client and into the ASP tier of your now-distributed application.

    The N-tier application model changes quite a bit and you can't really use simple monolithic coding anymore. This is exactly why most people either keep everything local and/or move to a client-server DBMS: staying with simple monolithic coding supplemented by stored procedures here and there. It can also be enough work that historically most people just punt, throwing away client-side code and making a web application.

    If any of this is new to you I think you are biting off far more than you are prepared to chew.

  24. #24
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: [Newbie] Cloud database on VB6

    Quote Originally Posted by DEXWERX View Post
    Using VB6 from a Cloud MySQL instance isn't as simple as changing the connection string. As dil pointed out - on most shared instances, you won't have direct port access to the DB. you'll need a "service" similar to the ASP Schmidt posted.
    I didn't drill down too deep in Google's site, but they do seem to make provisions for using "MySQL Client" (from a VB6 point of view probably the ODBC Driver is enough?) for external connections. I didn't see what the restrictions are, maybe whitelisting fixed IP addresses? Probably some extra charges too.

    Figuring out the cost of Cloud services is always a lot of "fun" as well. There are lots of usage models with different rates based on type and pattern of access. That's part of the attraction of renting a naked host instance like those 1and1 probably offers: the pricing model is much simpler. You're just getting less, though it may be all you need.

  25. #25
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,454

    Re: [Newbie] Cloud database on VB6

    Quote Originally Posted by DEXWERX View Post
    Schmidt actually posted the easiest. The easiest however is just not what most of use would do The example service Schmidt posted leaves the entire DB open to the internet (it is just an example). so you'll probably want a little more security than completely wide open.
    It's not "as open" as you might think.

    It is currently open for "public read-only access" because I wanted it to be this way - but try as you might,
    you will have no way to manipulate the content of the NWind.mdb, if I don't allow you to do so.

    If you don't want a DB to be open for public Read-Access (as in my example),
    then the simplest way is, to choose a "strong name" for the DB, with a very long filename,
    throw in a few "special chars" for good measure, and then hide that DB-File behind another
    "strong-named" directory.

    Remember, that the Example was doing things over https, so there's no way to figure
    the hidden DBDirectory/DBNames out over wireshark or other listening-attacks on sockets.

    And since it's https, you could ensure even better security (including user-authentication),
    when you use the ASP-session-handling in conjunction with a http-authentication-scheme.
    With https, even simple http-base(64)-auth would be sufficient (and this is supported
    with a single line of code in the http-5.1.objectmodel over the .SetCredentials-Method).

    Quote Originally Posted by DEXWERX View Post
    You could use Schmidt's example as a starting point and create a more specific and secured web api.
    There's not much more to do, to make it even more secure - as already said, the most important thing
    (the transport-channel) *is* already secure (per https and a strong-signed SSL-certificate which comes with
    the contract). No fiddling with VPN-setups or Firewalls needed, https-requests are a (preconfigured)
    bread-and-butter thing these days on most client-OSes and http-libs (as the MS http 5.1 lib).

    Quote Originally Posted by DEXWERX View Post
    It actually all depends on where you want to host the data. Some generic shared servers may not even have ASP, or a shared windows environment.
    That's why I mentioned the necessity, to order a Windows-Hosting-contract (with IIS and classic ASP support).
    Nearly all normal Inet-Providers have such a thing on offer (besides their usual Linux-Hosting-contracts with LAMP).
    It will usually cost about 30% (3-5$/Euro) more per month than Linux-Hosting, but IMO this is well invested money,
    when you're able to use VB-Code and COM-libs on the serverside (and can test the serverside routines also in the VB6-IDE).

    Quote Originally Posted by DEXWERX View Post
    I bet if you're willing to shell out the big bucks - you can have a windows server with the ports you need open to the internet. (then it is just a connection string update)
    Any professional with some experience in that field (internet-services, internet-db-access)
    would disencourage you from working over "a native DB-port" (opened at the clientside).

    Robust internet-apps "hide" the DB from the clientside, and open connections to it only at the serverside.
    They work with disconnected Data-Containers (disconnected JSON-Resultsets - or disconnected ADO-Recordsets)
    to retrieve Data, or to transport "Data for Updates".

    ADO-Recordsets do have an UpdateBatch-method, and so are capable to accumulate
    Deletes/Inserts/Updates on the clientside - and apply them at the serverside after a reconnect
    to a Cnn and an UpdateBatch-call.

    So, to expand my example in write-direction (making it fully "CRUD-capable" in a generic way), I would only
    have to throw in two or three more little functions at the serverside - and a handful of lines at the clientside.

    The few "cross-table-" or "cross-db-"transactions one will encounter in a more complex app, can also be
    covered by dedicated serverside VBScript-functions (then doing the important transactions on *serverside*
    connection-objects, not clientside ones as you proposed, where the underlying sockets could go "out
    of internet-scope" at the next hickup of your WLAN-access-point).

    Best of all, I can test and debug all that in the VB6-IDE (working against a local DB).

    Olaf

  26. #26
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,454

    Re: [Newbie] Cloud database on VB6

    Quote Originally Posted by dilettante View Post
    Figuring out the cost of Cloud services is always a lot of "fun" as well. There are lots of usage models with different rates based on type and pattern of access. That's part of the attraction of renting a naked host instance like those 1and1 probably offers: the pricing model is much simpler. You're just getting less, though it may be all you need.
    Actually, I've just choosen an option in the Google-Pricing-Model,
    which should be relatively comparable to the performance-level of the 1and1-contract I have -
    (with their db-n1-standard-1) ... and it comes out factor 5 more expensive (in their price-calculator)...
    https://cloud.google.com/products/calculator/#



    Besides, included in the 1and1 contract are also unlimited MySQL-Databases and
    10 MS-SQLServer-Databases (besides the ability to host Desktop-DBs like JET-MDBs
    or SQLite).

    Again, not trying to advertise 1and1 here, I mean it more as a kind of "warning",
    to not drink all the cool-aid that's circulating around the "cloud"-buzzword...

    A similar priced contract from a normal provider will give you (in my experience)
    (much) more performance for the money - at least entirely sufficient, to get your feet wet,
    learn to implement your own web-service with classically implemented (http/https-based)
    remote-procedure-calls - entirely sufficient to serve your first "paying 100 customers"...

    When your amount of customers increases to 500 or 1000 (the performance of your simple
    contract not sufficient anymore), that's usually a "nice problem to have" - so, think about
    upgrading your "normal contract" *if* that happens, but not before.

    The serious cloud-offers (with setups that actually start to "really perform") will cost you
    about 100bucks per month - but then, with that money you can also buy into some
    much more powerful contracts with normal inet-providers...

    Another thing to consider... when you run your business on your own server (on your own domain),
    you're kind of "flying under the radar" (the well-experienced hacker-groups have usually no interest
    in getting into the web-accounts of "apple-and-bananas.com" - they try themselves on the "big names" instead -
    and when those blow up, there's usually millions of accounts compromised (it already did happen, and will
    happen again).

    Olaf

  27. #27
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,229

    Re: [Newbie] Cloud database on VB6

    Any professional with some experience in that field (internet-services, internet-db-access)
    would disencourage you from executing arbitrary SQL against an internet facing DB.

    SSL can't defend against a hacker that is the end point... (although I'm glad you mentioned authentication, despite not using it in your demo)
    Read-Only SQL can't defend against
    Code:
    SELECT * FROM 
    [Order Details] a,[Order Details] b, [Order Details] c, [Order Details] d, 
    [Order Details] e,[Order Details] h, [Order Details] k, [Order Details] p, 
    [Order Details] f,[Order Details] i, [Order Details] l, [Order Details] o, 
    [Order Details] g, [Order Details] j, [Order Details] m, [Order Details] n, 
    [Order Details] some_pain,
    [Order Details] a_little_more,
    [Order Details] uncle;

  28. #28
    Lively Member
    Join Date
    Oct 2008
    Posts
    126

    Re: [Newbie] Cloud database on VB6

    Hello,
    Using code in post2 i get the error "security error message".
    Code:
    Req.Open "POST", "https://vbRichClient.com/asp/ADODBTest.asp", False
    If I change to
    Code:
    Req.Open "POST", "http://vbRichClient.com/asp/ADODBTest.asp", False
    the code is working.

    How tu use authentication?

  29. #29
    PowerPoster
    Join Date
    Sep 2012
    Posts
    2,083

    Re: [Newbie] Cloud database on VB6

    Olaf's solution is very interesting and valuable. There are a number of ways to avoid SQL-Injection mentioned by DEXWERX.

    All the same, how to develop 'Cloud-App' or 'Internet-App' easily and securely is still a big problem for VB6.

    Could Olaf's vbRichClient5 provide a complete-fast-secure solution to develop 'Cloud-App' or 'Internet-App' for VB6 programmers?

  30. #30
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,897

    Re: [Newbie] Cloud database on VB6

    Quote Originally Posted by dreammanor View Post
    Olaf's solution is very interesting and valuable. There are a number of ways to avoid SQL-Injection mentioned by DEXWERX.

    All the same, how to develop 'Cloud-App' or 'Internet-App' easily and securely is still a big problem for VB6.

    Could Olaf's vbRichClient5 provide a complete-fast-secure solution to develop 'Cloud-App' or 'Internet-App' for VB6 programmers?
    Depending on your definition of cloud, you certainly can do this with vbRichClient5 as a key component. I don't know about the scalability aspect - my application typically would have less than 100 users at a time as most companies I work with want their own "private" cloud system, so I don't think you'll be making the next Facebook with this approach, but hey maybe

    What I have in my system is a service running under Windows or Linux/Wine (RC5 classes work quite nicely under Wine) that acts as a broker between my user's database(s) (SQLite as shipped with RC5) and my users' machines. The user machines can have a native Windows client installed that communicates over an encrypted channel across the Internet to the server (using built-in RC5 RPC classes), and I also have a web interface that runs in the users' browsers. The browser connects to a normal web server (I use nginx), and the NGINX web server connects back to an custom FCGI server implementation. The FCGI server connects back to my RC5 service and the FCGI servier handles the translation of browser requests to RC5 RPC calls and back to HTTP responses (such as HTML, AJAX, etc...). Finally, NGINX handles all of the stuff between the FCGI server and the browser (in particular stuff like SSL, load balancing, etc...)

    I posted a small demo of my FCGI implementation a while back, but there was no interest so it hasn't been updated in a while and has some known bugs unfortunately. Here's the link if you are interested: http://www.vbforums.com/showthread.p...FastCGI-Server

    Lastly, you can see a demo of my web interface below. NOTE There is music in the video, so turn your volume down if that would be bothersome! At the back end it's all SQLite databases with RC5 handling the data connections. The FCGI server builds dynamic HTML from the data it gets from the RC5 RPC service and serves it back to NGINX, which serves it back to the browser. Works quite nicely (if a bit Rube Goldberg-ish) if I do say so myself


  31. #31
    Hyperactive Member
    Join Date
    Jul 2013
    Posts
    403

    Re: [Newbie] Cloud database on VB6

    This is really impressive Jason, congratulations - I won't tell anybody about your musical taste
    Carlos

  32. #32
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,897

    Re: [Newbie] Cloud database on VB6

    Haha, thanks Carlos After making the software and the video, I got a bit lazy searching through YouTube's freely usable music, I'll admit!

  33. #33
    Hyperactive Member
    Join Date
    Jul 2013
    Posts
    403

    Re: [Newbie] Cloud database on VB6

    Quote Originally Posted by jpbro View Post
    Haha, thanks Carlos After making the software and the video, I got a bit lazy searching through YouTube's freely usable music, I'll admit!
    I've made a music a few years ago to put in a site I had a the time to avoid licensing problems. It's a 1mn mp3 that perfectly links the end to the start so you can put it in repeat mode. I can send it to you if you're interested.
    (Sorry for the OT)
    Carlos

  34. #34
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,897

    Re: [Newbie] Cloud database on VB6

    Quote Originally Posted by Carlos Rocha View Post
    I've made a music a few years ago to put in a site I had a the time to avoid licensing problems. It's a 1mn mp3 that perfectly links the end to the start so you can put it in repeat mode. I can send it to you if you're interested.
    (Sorry for the OT)
    Sure! Thanks a lot

  35. #35
    PowerPoster
    Join Date
    Sep 2012
    Posts
    2,083

    Re: [Newbie] Cloud database on VB6

    Quote Originally Posted by jpbro View Post
    Depending on your definition of cloud, you certainly can do this with vbRichClient5 as a key component. I don't know about the scalability aspect - my application typically would have less than 100 users at a time as most companies I work with want their own "private" cloud system, so I don't think you'll be making the next Facebook with this approach, but hey maybe

    What I have in my system is a service running under Windows or Linux/Wine (RC5 classes work quite nicely under Wine) that acts as a broker between my user's database(s) (SQLite as shipped with RC5) and my users' machines. The user machines can have a native Windows client installed that communicates over an encrypted channel across the Internet to the server (using built-in RC5 RPC classes), and I also have a web interface that runs in the users' browsers. The browser connects to a normal web server (I use nginx), and the NGINX web server connects back to an custom FCGI server implementation. The FCGI server connects back to my RC5 service and the FCGI servier handles the translation of browser requests to RC5 RPC calls and back to HTTP responses (such as HTML, AJAX, etc...). Finally, NGINX handles all of the stuff between the FCGI server and the browser (in particular stuff like SSL, load balancing, etc...)

    I posted a small demo of my FCGI implementation a while back, but there was no interest so it hasn't been updated in a while and has some known bugs unfortunately. Here's the link if you are interested: http://www.vbforums.com/showthread.p...FastCGI-Server

    Lastly, you can see a demo of my web interface below. NOTE There is music in the video, so turn your volume down if that would be bothersome! At the back end it's all SQLite databases with RC5 handling the data connections. The FCGI server builds dynamic HTML from the data it gets from the RC5 RPC service and serves it back to NGINX, which serves it back to the browser. Works quite nicely (if a bit Rube Goldberg-ish) if I do say so myself


    Thanks jpbro. Your Project Nomad Teaser is wonderful and I'll take some time to learn your FastCGI-Server.

  36. #36
    Lively Member
    Join Date
    Oct 2008
    Posts
    126

    Re: [Newbie] Cloud database on VB6

    Hello Olaf
    why using your code in post2 i get the error "security error message"?
    Please,can you improve your demo in post2 adding authentication in the sample code?
    Thanks for yout time and effort

  37. #37
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,897

    Re: [Newbie] Cloud database on VB6

    For those who had interest in my FCGI application server, it's been extended a bit and is now on GitHub here: https://github.com/jpbro/VbFcgi

  38. #38
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: [Newbie] Cloud database on VB6

    I didn't read every single post in this thread but from what I did read, I noticed that no one suggested SQL Server on the Azure cloud. I briefly had a chance to dip my toes in it and was surprised at how extremely simple it is. While .Net did provide a neat API for dealing with Azure storage and other Azure resources, as far as I could tell, SQL Databases were quite trivial to work with. You could use all the normal providers in tandem with ADO from VB6 almost exactly as you would with an SQL Server instance on a local network.

    This is by far the easiest solution he could pursue. With an Azure account he could get something simple working in a matter of minutes and with no more or less code than any other SQL Server client application, and he doesn't need to learn anything new if he already knows how to write SQL Server client applications. It's literally the exact same code. The only difference is the connection strings being used.

    You guys should have suggested this first. It's almost insane not to suggest this.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  39. #39
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,897

    Re: [Newbie] Cloud database on VB6

    The last time I looked at Azure the pricing had me a bit spooked - there was separate pricing for all sorts of different categories (CPU usage, IO usage, Network usage, etc...). There was a cost estimator, but you essentially had to guess at what your workload might be and hope you were accurate. This makes it difficult to handle situations where your customers demand a fixed monthly price for your software. There are VPS hosts (Linux and Windows) out there that offer fixed monthly rates which can be very appealing. Maybe Azure does this now too, or maybe I just missed something back when I tried it out, but that was one thing that kept me away from it.

    PS: Not sure it's "insane" for no one in this thread to suggest something that they haven't had any experience with, but thanks for bringing it up based on your experience.

  40. #40
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: [Newbie] Cloud database on VB6

    If you want flat-rate pricing you probably want hosting, not cloud services.

Page 1 of 2 12 LastLast

Posting Permissions

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



Click Here to Expand Forum to Full Width