Results 1 to 1 of 1

Thread: Connect to a network Access database

  1. #1

    Thread Starter
    Lively Member achor's Avatar
    Join Date
    May 2006
    Location
    Porto
    Posts
    123

    Connect to a network Access database

    Hello All,

    FIRST OF ALL: THIS POST IS BIG BECAUSE IT IS EXPLAINED STEP BY STEP


    I need help developing my aplication. I've already searched everywhere but I couldn't find my answer .I'm developing in VB6, I use Crystal Reports
    10.

    I have my database in a computer which is in my local network.

    All computers in the network can access the database without any problems:
    Code:
    Set cnnFact = New ADODB.Connection
        cnnFact.Open "Driver=Microsoft Access Driver (*.mdb);DBQ=\\Olivet-01\GestFacturas\Database\GestFact.mdb;", , "2006"
    The 'Olivet-01' has my program running, and I can connect it with the .rpt file
    without problems.
    Code:
    Set CrxReport = CrxApplication.OpenReport(App.Path & "\Report\OlivetFAUA.Rpt")
    CrxReport.RecordSelectionFormula = "{Fact.NID} = " & lstIDFact
    
    CrxReport.Database.LogOnServer CrxReport.Database.Tables(1).DllName, "localhost", "C:\Programas\GestFacturas\Database\Gestfact.mdb", , "2006"
    
    frmReport.CrystalActiveXReportViewer1.ReportSource = CrxReport
            frmReport.CrystalActiveXReportViewer1.ViewReport
            
            frmReport.CrystalActiveXReportViewer1.Zoom 100
            Screen.MousePointer = vbDefault
            
            frmReport.Show
            frmReport.WindowState = vbMaximized
            
            With frmReport.CrystalActiveXReportViewer1
               .Top = 0
               .Left = 0
               .Width = frmReport.ScaleWidth
               .Height = frmReport.ScaleHeight
            End With
    Now I want to Connect the other pc's to that database through the crystal viewer in the application.

    If I change this line:
    Code:
    CrxReport.Database.LogOnServer CrxReport.Database.Tables(1).DllName, "Olivet-01", "\\Olivet-01\gestfacturas\Database\GestFact.mdb", , "2006"
    ... But I get an error saying that the password is wrong.


    I've allready tried this:
    Code:
    CrxReport.Application.LogOnServer "P2SODBC.DLL", "\\Olivet-01", "GestFact.mdb", "administrator", "2006"

    All computers in the network uses Windows XP.
    I think I said it all, but if you need more information I'll be glad to give.

    Many thanks in advance.
    Last edited by achor; Oct 28th, 2007 at 07:57 AM. Reason: I believe nobody is viewing my post due to it's lenght.

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