kkirtac Posted May 20, 2006 Posted May 20, 2006 (edited) hi, here is my code, i receive strange error... Dim rptKadirReport As ReportDocument = New CrystalDecisions.CrystalReports.Engine.ReportDocument() Dim reportPath As String = Application.StartupPath & "\.." & "\.." & "\" & "KadirReport.rpt" Private connStr As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=dental.mdb" Private conn As System.Data.OleDb.OleDbConnection = New System.Data.OleDb.OleDbConnection(connStr) conn.Open() Dim str As String = "SELECT AD, SOYAD, CEP_TEL FROM HASTA" Dim da1 As System.Data.OleDb.OleDbDataAdapter = New System.Data.OleDb.OleDbDataAdapter(str, conn) Dim ds1 As DataSet = New DataSet("Hasta") da1.Fill(ds1, "HASTA") Dim ds2 As DataSet = New DataSet("Tarih") str = "SELECT TARIH FROM MUAYENE" Dim da2 As System.Data.OleDb.OleDbDataAdapter = New System.Data.OleDb.OleDbDataAdapter(str, conn) da2.Fill(ds2, "MUAYENE") Dim ds3 As DataSet = New DataSet("Islem_Adi") str = "SELECT ISLEM_ADI FROM ISLEMLER" Dim da3 As System.Data.OleDb.OleDbDataAdapter = New System.Data.OleDb.OleDbDataAdapter(str, conn) da3.Fill(ds3, "ISLEMLER") ds1.Merge(ds2) ds1.Merge(ds3) conn.Close() rptKadirReport.Load(reportPath) rptKadirReport.SetDataSource(ds1) crvKadir.ReportSource = rptKadirReport 'here i receive the same 'Declaration expected' for these : conn, da1, da2, str, da3, rptKadirReport, crvKadir strange isn't it... Edited May 21, 2006 by PlausiblyDamp Quote
Leaders snarfblam Posted May 20, 2006 Leaders Posted May 20, 2006 Maybe it has something to do with the fact that you dim the same variables more than once. Quote [sIGPIC]e[/sIGPIC]
kkirtac Posted May 21, 2006 Author Posted May 21, 2006 no, i m sure they are not doubled...i ve also imported the libraries correctly...damn error Quote
Leaders snarfblam Posted May 21, 2006 Leaders Posted May 21, 2006 Oops. My bad. I guess I can't read. I couldn't tell the da's from the ds's. Quote [sIGPIC]e[/sIGPIC]
Administrators PlausiblyDamp Posted May 21, 2006 Administrators Posted May 21, 2006 Is this all one method or have you pasted several bits of code together? Just curious because the 'Private' keyword isn't valid inside a method body. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
kkirtac Posted May 22, 2006 Author Posted May 22, 2006 i ve forgot to put the code inside a methos body , its fine now thx Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.