 |
| General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category.
** PLEASE BE SPECIFIC WITH YOUR QUESTION **
When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

August 26th, 2004, 12:25 AM
|
|
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
DataGrid cant rebind... pls help o any advice
ARGH.... Hi,
I trying to get my datagrid binded after users click on update link button in datagrid...
can anyone help me on this...
i've check the sql statement: Select * From StockOnHand Where ItemCode=ABC
my code looks fine, but y it show error to me....
No value given for one or more required parameters.
Exception Details: System.Data.OleDb.OleDbException: No value given for one or more required parameters.
Source Error:
Line 256: ObjCmd1.Fill(DsStockOnHand, "StockOnHand")
Here is my code
Function UpdateStore(e as DataGridCommandEventArgs)
...
... ' update record, no problem
...
'Bind data after update
lbldg.Text=Ctype(e.Item.Cells(2).Controls(0), textbox).text
Dim strFillDg as string="Select * From StockOnHand Where ItemCode=" & Ctype(e.Item.Cells(2).Controls(0), textbox).text
dim ObjCmd1 as new OleDbDataAdapter(strFillDg, Conn)
dim DsStockOnHand as DataSet = new DataSet()
response.Write(strfilldg)
'try
ObjCmd1.Fill(DsStockOnHand, "StockOnHand")
DgData.DataSource = DsStockOnHand.Tables("StockOnHand").DefaultView
DgData.DataBind()
'catch ex as OleDbException
'end try
FillDataGrid1(-1)
return blnGo
end function
Can any1 helps? Thanks in advance...
Regards
life's Ng
|
|

August 26th, 2004, 07:44 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Hey,
What is Conn (a OleDbConnection or a Connection string)? In addition, What does FillDataGrid1 do?
I wonder if the problem is with the connection, and not the adapter. When the adapter fills a data set, it opens the connection, which the problem could look like the adapter, but be something else.
Brian
|
|

August 26th, 2004, 10:00 PM
|
|
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi, Thanks for reply!
Conn is a OleDbconnection, thanks for ur suggestion, i will take note of this next time(Coz i already delete this junk of code yesterday due to frustration... :P)
Regards
life's Ng
|
|

August 30th, 2004, 07:32 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Hey,
Then, are you still having problems? If so, let me know the new error and post updated code.
Brian
|
|
 |