|
-
Feb 19th, 2003, 07:29 AM
#1
Thread Starter
New Member
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 OLEDB atabase 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
-
Feb 20th, 2003, 01:43 AM
#2
Hyperactive Member
-
Feb 22nd, 2003, 05:41 PM
#3
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|