Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2006
    Posts
    4

    Unanswered: VB6 can't update access 2k on the web

    Hi,

    I am new in this forum so if I make any mistakes please correct me.

    I have a huge problem with vb6 and MS Access 2k. I can add a new row i I do it on c:\..., but if I do it on my webpage. I get: "Run-time error -2147467259(80004005)" and I have absolut no idea what that means. The code I use is:

    ----------------

    Private Sub AddRecord(Path As String)

    Dim cn As ADODB.Connection
    Dim rs As ADODB.Recordset
    Dim sql As String
    Dim connstr As String
    Dim a As Double
    Dim b As Variant
    Dim i As Integer
    Dim kk As Database
    Dim kkRS As Recordset

    connstr = "provider=microsoft.jet.oledb.4.0;data source=http://www.*.*/kk.mdb"

    Set cn = New ADODB.Connection

    cn.Open connstr

    Set rs = New ADODB.Recordset

    sql = "kundeinformation" 'specify where condition here

    Set rs = cn.Execute(sql)

    Set kk = OpenDatabase("www.*.*")

    Set kkRS = kk.OpenRecordset("Kundeinformation", dbOpenTable)

    kkRS.AddNew
    kkRS.Fields(0).Value = 1
    kkRS.Fields(1).Value = 2
    kkRS.Fields(2).Value = 3
    kkRS.Fields(3).Value = 4
    kkRS.Fields(4).Value = 5
    kkRS.Fields(5).Value = 6
    kkRS.Fields(6).Value = 7
    kkRS.Fields(7).Value = 8
    kkRS.Fields(8).Value = 9
    kkRS.Fields(9).Value = 10
    kkRS.Fields(10).Value = 11
    kkRS.Fields(11).Value = 12
    kkRS.Update
    kkRS.Close
    kk.Close
    Set kk = Nothing
    End If


    End Sub
    Private Sub command1_Click()


    AddRecord "http://www.*.*/kk.mdb"
    Unload Me

    End Sub

    ----------------

    There is no password or login on kk.mdb and as I told i works if I do it localy.

    I would realy apreciate any help.

  2. #2
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    It's because Access is NOT a database server - it is a data file. You CAN'T use it as a back end unless the file system can link to it and read it directly. (If you could map a drive to the folder where the .mdb file sits, then you can connect to it. If you can't map a drive, then you can't connect.)

    The only way that I'm aware of to approach it would be to set up a VPN between the client PC and the Access file server. Even then, remember that Access is very succeptable to corruption, and it is sensitive to timing issues even with different network OS's. We've experienced corruprion issues when an access file is stored on a Novell server, and it's being accessed by windows PCs. I would be VERY leery of a VPN approach for this reason.

    Why not go with a real database server solution like MSDE or PostgreSQL or MySQL?
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  3. #3
    Join Date
    Apr 2006
    Posts
    4

    Thank you for answering

    Hi loquin,

    Thx for repplying to the quistion. I'm sorry for the late repply, but i live in EU.

    I've made a program that will be distributed within 3 weeks, and have used Access in it and therefore I thougt that I also could use it on the web.

    Do you know if I could call a sql DB string same way that I call a Access:

    connstr = "provider=microsoft.jet.oledb.4.0;data source=http://www.*.*/kk.mdb"

    Thx for your help.

  4. #4
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    Quote Originally Posted by jonas.bruhn
    Hi loquin,

    Thx for repplying to the quistion. I'm sorry for the late repply, but i live in EU.

    I've made a program that will be distributed within 3 weeks, and have used Access in it and therefore I thougt that I also could use it on the web.

    Do you know if I could call a sql DB string same way that I call a Access:

    connstr = "provider=microsoft.jet.oledb.4.0;data source=http://www.*.*/kk.mdb"

    Thx for your help.
    Suppose you install MSDE on a server. You could create a connection string for MSDE that could be used over the internet. Or you installed PostgreSQL. Or you installed MySQL. Any of these are true database servers and can be accessed by DNS name or by I/P address. (Although MySQL is late to the dance with the more advanced database features)

    Ref Carl Prothman's Connection String Site

    MSDE has probably the "closest" SQL syntax to Access. But, since Access is not nearly as SQL Compliant as are the other databases, all will require some work in modifying your app to work with them.

    One thing to keep in mind; since Access is data file, it CANNOT support server-side cursors. Server-side cursors allow the bulk of the query processing to take place inside the server, and only send the filtered, sorted data over the internet to your client. This can greatly reduce the amount of data sent from server to client, and can thus improve the performance and the economic viability of the system. (assume you are on a bandwidth limited server, for instance, and end up being charged for bandwidth overages...)
    Last edited by loquin; 04-26-06 at 19:23.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


Posting Permissions

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