Results 1 to 3 of 3

Thread: Crystal Report Database Connection Problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2003
    Posts
    1

    Crystal Report Database Connection Problem

    Hi. I dont connect my local access database in vb.net code for crystal report. It is not accept my password or database location. Error code is "Invalid tale number". Please help me. Code is:

    Public vt_path = System.Windows.Forms.Application.StartupPath
    Public baglanti As New ADODB.Connection()
    Public strcon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & vt_path & "\verit.mdb;Jet OLEDBatabase Password=" & vt_password & ";"
    Public rs = New ADODB.Recordset()
    Public sql, tur As String
    --------------------------------------
    Private Sub frm_ogrenci_raporu_sor_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Try
    baglanti.Open(strcon)
    Catch
    MsgBox("Hata : Veritabaný bulunamadý." + Err.Description, MsgBoxStyle.DefaultButton1, "Hata Oluþtu")
    Me.Close()
    End Try
    End Sub
    --------------------------------------------------------------
    Private Sub cmd_tamam_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmd_tamam.Click
    Dim frm As New frm_rapor()


    sql = "..."

    rs.open(sql, baglanti, 1, 3)

    Dim rapor As New cry_ogrenci_listesi_tam()
    rapor.Database.Tables(0).Location = vt_path & "\verit.mdb;"
    rapor.SetDataSource(rs)
    frm.CrystalReportViewer1.ReportSource = rapor

    frm.MdiParent = Me.MdiParent
    frm.Show()
    Me.Close()
    End Sub

  2. #2
    Hyperactive Member vbud's Avatar
    Join Date
    Jan 2002
    Location
    Mru 20 17S, 57 33E Goal: Get out of the BOX Status: In The Shadows!!! Target Posts: 3,000,000,000
    Posts
    378
    >!v!<
    Free your mind, stop thinking
    http://inspirone.blogspot.com

    Please rate this post if it helped you

  3. #3
    New Member
    Join Date
    May 2002
    Posts
    6
    You can also check out this free ebook on Crystal Reports. It has 15 chapters of turorials.


    http://www.CrystalReportsBook.com?cpgn=vbforums

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