i have error in this line: paramField.Name = "@NoPersoneli"; thanks a lot
NiloofarNoroozi
Posts
-
The parameter is incorrect -
The parameter is incorrectprogram run when form opens i see this error
-
The parameter is incorrecthi i use these codes for reporting my proc:
create proc Cpost
@nopersoneli int
As
Select p.fname,p.lname,p.NoPersoneli,po.name from personal p
Join postpersonal pp
On p.NoPersoneli=pp.Cpersonal
Join post po
On po.code=pp.vpostReportDocument reportDocument = new ReportDocument();
ParameterField paramField = new ParameterField();
ParameterFields paramFields = new ParameterFields();
ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
paramField.Name = "@NoPersoneli";
paramDiscreteValue.Value = "45";
paramField.CurrentValues.Add(paramDiscreteValue);
paramFields.Add(paramField);
crystalReportViewer1.ParameterFieldInfo = paramFields;
reportDocument.Load(@"C:\Documents and Settings\Administrator\Desktop\VEZARAT\VEZARAT\PostCrystalReport.rpt");
reportDocument.SetDatabaseLogon("", "", "niloofar\\i2", "vezaratekar", false);
crystalReportViewer1.ReportSource = reportDocument;error:The parameter is incorrect please help to me thanks a lot
-
Load report failed.i have problem in crystalreport. error:Load report failed.
Vpost vpost = new Vpost();
int nopersoneli;
int.TryParse(vpost.txtNoPersoneli.Text.ToString(), out nopersoneli);
ReportDocument reportDocument = new ReportDocument();
ParameterField paramField = new ParameterField();
ParameterFields paramFields = new ParameterFields();
ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
paramField.Name = "@nopersoneli";
paramDiscreteValue.Value = nopersoneli;
paramField.CurrentValues.Add(paramDiscreteValue);
paramFields.Add(paramField);
crystalReportViewer1.ParameterFieldInfo = paramFields;
** reportDocument.Load("PostCrystalReport1.rpt");** reportDocument.SetDatabaseLogon("", "", "niloofar\\i2", "vezaratekar", false);
crystalReportViewer1.ReportSource = reportDocument; -
reporting of procthanks for your answer but i have problem about to send parameter to proc please send me 1 or 2 example i need it thank you very much
-
reporting of prochi do you have any example that to report(crystalreport) from proc(sql server 2005)? thanks a lot
-
restorehi i use these code for restore
this.openFileDialog1.ShowDialog(); if ((this.openFileDialog1.FileName != "") && (this.openFileDialog1.FileName!="openFileDialog1")) { try { filename = openFileDialog1.FileName; SqlConnection SqlCon = new SqlConnection(); SqlCon.ConnectionString = global::project.Properties.Settings.Default.dabirkhanehConnectionString; SqlCommand SqlCom = new SqlCommand(); SqlCom.Connection = SqlCon; SqlCon.Open(); SqlCom.CommandText ="ALTER DATABASE dabirkhaneh SET SINGLE\_USER WITH ROLLBACK IMMEDIATE" +" USE master; RESTORE DATABASE dabirkhaneh FROM DISK =N'"+filename+"'"; SqlCom.Connection = SqlCon; SqlCom.ExecuteNonQuery(); SqlCon.Close(); // \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*// SqlCon.Open(); SqlCom.CommandText ="ALTER DATABASE dabirkhaneh SET MULTI\_USER "; SqlCom.Connection = SqlCon; SqlCom.ExecuteNonQuery(); SqlCon.Close(); MessageBox.Show("بازیابی با موفقیت انجام شد"); } catch { MessageBox.Show("بازیابی با موفقیت انجام نشد"); } }
but i have error; The tail of the log for the database "vezaratekar" has not been backed up. Use BACKUP LOG WITH NORECOVERY to backup the log if it contains work you do not want to lose. Use the WITH REPLACE or WITH STOPAT clause of the RESTORE statement to just overwrite the contents of the log. RESTORE DATABASE is terminating abnormally. Changed database context to 'master'. please help thanks
-
problem in inputtxtNoPersoneli forexample=45
-
problem in inputhi i have problem with this code objCommand.Parameters["@nopersoneli"].Value = Int32.Parse(vpost.txtNoPersoneli.Text); :error Input string was not in a correct format why? please help me
-
use control in other formi change to public,but yet i can not use that
-
use control in other formhow can i use txtNoPersoneli when this is in other form?
-
problem in codehi when i run this code this generate error why? objCommand.Parameters.Add("@nopersoneli", SqlDbType.int).Value =int.parse(txtNoPersoneli.text); thanks a lot
-
report of procHi I use proc for reporting
create proc Cpost @nopersoneli int as select p.Fname ,p.lname ,p.NoPersoneli,po.[name] from personal p join postPersonal pp on p.NoPersoneli=pp.CPersonal join post po on po.code=pp.CPost where p.NoPersoneli=@nopersoneli
But I don’t understand How I write code? I made postdataset.xsd and I fill by result of proc.and then I made postcrystalReport.rpt ,I have one form include of CrystalReportViewer1 that ReportSource=postCrystalReport Please help me about writing code Thanks a lot -
connect to dataasethank you very much
-
connect to dataasehi do you have any article and example about connect to the database(sql server)? plaese learn to me how can i connect textbox to query? thanks
-
dataset,dataadapterbut i have one table and 2 query now do i need one dateset?
-
dataset,dataadapterHi I have 2 queries,1 query for datagrid anad the other for textbox in one form. How can I use dataset,dataAdapter,dataview…? Do I need one dataset or two? Please help me Thank you very much
-
timehi how can i show time(now)in lable? please describe complete thanks a lot
-
connection stringthank you very much
-
connection stringI have 2 instance. i used this: Driver={SQL Native Client};Server=myServerName\theInstanceName;Database=myDataBase;Trusted_Connection=yes; but i have a problem yet. my eroor: recognize escape sequence help me please