EN / USD
32
of 76
TEP , The Engineering Projects , Image

syedzainnasir

TEP , The Engineering Projects , Rating 7.5 7.5 / 10
TEP , The Engineering Projects , Icon Level: Moderator
TEP , The Engineering Projects , Icon Joined: 20 Mar 2022
TEP , The Engineering Projects , Icon Last Active: 2:21 PM
TEP , The Engineering Projects , Icon Location: TEP , The Engineering Projects , Flag
TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon
No value given for one or more required parameters. WHILE FILLING DATATABLE
TEP , The Engineering Projects , Calender Question: 07-Mar-2017
TEP , The Engineering Projects , Category In: Microsoft Visual Studio Projects
i create a datatable in dataset in degine mode with union query.


query as below

SELECT DateofPickup AS Mdate, Name, Address, PhoneNo, SerialNo, DateofVist, ItemName, DateofPickup, TotalQty, Rateof, OpeningB, Dateofretrun, Retrun, Balance,
TotalDay, NULL AS adv
FROM Report
UNION ALL
SELECT Dateofpay AS Mdate, Name, Address, PhoneNo, SerialNno AS SerialNo, DateofVist, NULL AS ItemName, Dateofpay AS DateofPickup, NULL AS TotalQty, NULL
AS Rateof, NULL AS OpeningB, NULL AS Dateofretrun, NULL AS Retrun, NULL AS Balance, NULL AS TotalDay, Adv
FROM PaymentDetail

when i try to fill this datatable with where condation on page load event then it show error (No value given for one or more required parameters.) without where condation its work fine. code as below.

Dim report As New CrystalReport1
OpenConnect()
Cmd.CommandText = "Select * from RFinal where serialno='" & Form4.SerialNoTextBox.Text & "'"

da.SelectCommand = Cmd
da.Fill(ds, "rfinal")---------error occur here No value given for one or more required parameters
report.SetDataSource(ds)
CrystalReportViewer1.ReportSource = report
dt.Clear()
da.Dispose()
conn.Close()
End Sub

i also try it with parameter

Cmd.CommandText = "Select * from RFinal where serialno=@a"

Cmd.Parameters.AddWithValue("@a", Form4.SerialNoTextBox.Text)

da.SelectCommand = Cmd
da.Fill(ds, "rfinal")---------error occur here No value given for one or more required parameters
report.SetDataSource(ds)
TEP , The Engineering Projects , Icon Answer: 0 TEP , The Engineering Projects , Icon Views: 150 TEP , The Engineering Projects , Icon Followers: 85
Small Bio
TEP , The Engineering Projects , Tags
PLC
Robot
STM32
Arduino
AI
ESP32
Ladder Logic
PLC Projects
Programming
Communicates STM32
PLC Projects
Communicates PLC
Font Style
Alignment
Indenting and Lists
Insert Media
Insert Items

Want to leave an answer!

Word Count :0 Draft Saved at 12:42 am.