ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Retrive OLE Object from Access Database and display in GridView using VB.Net in ASP.Net<p>Hi <a class="username" rel="xboxown"> xboxown</a>,</p> <p>Refer below link.</p> <p><a href="https://forums.asp.net/t/1993699.aspx?How+to+display+an+image+that+is+stored+in+a+table+using+OleDb+" target="_blank">https://forums.asp.net/t/1993699.aspx?How+to+display+an+image+that+is+stored+in+a+table+using+OleDb+</a></p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/646814/Retrive-OLE-Object-from-Access-Database-and-display-in-GridView-using-VBNet-in-ASPNet/https://www.aspforums.net:443/Threads/646814/Retrive-OLE-Object-from-Access-Database-and-display-in-GridView-using-VBNet-in-ASPNet/Thu, 03 Aug 2017 02:58:46 GMTRetrive OLE Object from Access Database and display in GridView using VB.Net in ASP.Net<blockquote><cite>AnandM says:</cite> <p>Hi <a class="username" rel="xboxown"> xboxown</a>,</p> <p>Refer below link.</p> <p><a href="https://forums.asp.net/t/1993699.aspx?How+to+display+an+image+that+is+stored+in+a+table+using+OleDb+" target="_blank">https://forums.asp.net/t/1993699.aspx?How+to+display+an+image+that+is+stored+in+a+table+using+OleDb+</a></p> <p>&nbsp;</p> </blockquote> <p>&nbsp;I tried but still fails. I am spinning my wheels &gt;&lt;</p>https://www.aspforums.net:443/Threads/646814/Retrive-OLE-Object-from-Access-Database-and-display-in-GridView-using-VBNet-in-ASPNet/https://www.aspforums.net:443/Threads/646814/Retrive-OLE-Object-from-Access-Database-and-display-in-GridView-using-VBNet-in-ASPNet/Thu, 03 Aug 2017 11:29:03 GMTRetrive OLE Object from Access Database and display in GridView using VB.Net in ASP.Net<p>Very simple I added another column in the datagrid (not edititem) but normal one for displaying text and in the vb.net side of things I just used directcast to find controller of that item by searcing for it's ID name. It takes whatever value entered from row(i) in the loop and stores it into access table.</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/646814/Retrive-OLE-Object-from-Access-Database-and-display-in-GridView-using-VBNet-in-ASPNet/https://www.aspforums.net:443/Threads/646814/Retrive-OLE-Object-from-Access-Database-and-display-in-GridView-using-VBNet-in-ASPNet/Sat, 05 Aug 2017 09:38:11 GMTRetrive OLE Object from Access Database and display in GridView using VB.Net in ASP.Net<p>Sure. </p> <p>HTML side of the code: </p> <pre class="brush: html"> &lt;asp:HiddenField ID=&#34;HiddenField1&#34; runat=&#34;server&#34; /&gt; &lt;asp:GridView ID=&#34;GridView1&#34; runat=&#34;server&#34; EmptyDataText=&#34;No data found.&#34; OnRowEditing=&#34;GridView1_RowEditing&#34; OnRowUpdating=&#34;GridView1_RowUpdating&#34; OnRowCancelingEdit=&#34;GridView1_RowCancelingEdit&#34; AutoGenerateColumns=&#34;False&#34; AllowCustomPaging=&#34;True&#34; AllowPaging=&#34;True&#34; AllowSorting=&#34;True&#34; CellPadding=&#34;4&#34; ForeColor=&#34;#333333&#34; GridLines=&#34;None&#34;&gt; &lt;AlternatingRowStyle BackColor=&#34;White&#34; /&gt; &lt;EditRowStyle BackColor=&#34;#2461BF&#34; /&gt; &lt;FooterStyle BackColor=&#34;#507CD1&#34; Font-Bold=&#34;True&#34; ForeColor=&#34;White&#34; /&gt; &lt;HeaderStyle BackColor=&#34;#507CD1&#34; Font-Bold=&#34;True&#34; ForeColor=&#34;White&#34; /&gt; &lt;PagerStyle BackColor=&#34;#2461BF&#34; ForeColor=&#34;White&#34; HorizontalAlign=&#34;Center&#34; /&gt; &lt;RowStyle BackColor=&#34;#EFF3FB&#34; /&gt; &lt;SelectedRowStyle BackColor=&#34;#D1DDF1&#34; Font-Bold=&#34;True&#34; ForeColor=&#34;#333333&#34; /&gt; &lt;SortedAscendingCellStyle BackColor=&#34;#F5F7FB&#34; /&gt; &lt;SortedAscendingHeaderStyle BackColor=&#34;#6D95E1&#34; /&gt; &lt;SortedDescendingCellStyle BackColor=&#34;#E9EBEF&#34; /&gt; &lt;SortedDescendingHeaderStyle BackColor=&#34;#4870BE&#34; /&gt; &lt;Columns&gt; &lt;asp:CommandField ShowEditButton=&#34;false&#34; /&gt; &lt;asp:TemplateField HeaderText=&#34;WorkOrderItemID&#34;&gt; &lt;ItemTemplate&gt; &lt;asp:Label ID=&#34;lblWorkOrderItemID&#34; runat=&#34;server&#34; Text=&#39;&lt;%# Eval(&#34;WorkOrderItemID&#34;) %&gt;&#39;&gt;&lt;/asp:Label&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:TemplateField HeaderText=&#34;Item&#34;&gt; &lt;ItemTemplate&gt; &lt;asp:Label runat=&#34;server&#34; ID=&#34;Items&#34; Text=&#39;&lt;%# Eval(&#34;Item&#34;) %&gt;&#39;&gt;&lt;/asp:Label&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:TemplateField HeaderText=&#34;Qty&#34;&gt; &lt;ItemTemplate&gt; &lt;asp:Label runat=&#34;server&#34; ID=&#34;idQty&#34; Text=&#39;&lt;%# Eval(&#34;Qty&#34;) %&gt;&#39;&gt;&lt;/asp:Label&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:TemplateField HeaderText=&#34;Description&#34;&gt; &lt;ItemTemplate&gt; &lt;asp:Label runat=&#34;server&#34; ID=&#34;idDescription&#34; Text=&#39;&lt;%# Eval(&#34;Description&#34;) %&gt;&#39;&gt;&lt;/asp:Label&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:TemplateField HeaderText=&#34;Units Received&#34;&gt; &lt;ItemTemplate&gt; &lt;asp:Label runat=&#34;server&#34; ID=&#34;lblNoteDisplay&#34; Text=&#39;&lt;%# Eval(&#34;Note&#34;) %&gt;&#39;&gt;&lt;/asp:Label&gt; &lt;/ItemTemplate&gt; &lt;EditItemTemplate&gt; &lt;asp:textbox ID=&#34;lblNote&#34; runat=&#34;server&#34; AutoPostBack=&#34;true&#34; Text=&#39;&lt;%# Bind(&#34;Note&#34;) %&gt;&#39;&gt;&lt;/asp:textbox&gt; &lt;/EditItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:TemplateField HeaderText=&#34;Complete?&#34;&gt; &lt;ItemTemplate&gt; &lt;asp:CheckBox runat=&#34;server&#34; ID=&#34;chkComplete&#34; Checked=&#39;&lt;%# Eval(&#34;IsComplete&#34;) %&gt;&#39; /&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:TemplateField HeaderText=&#34;Units Received All Fill&#34;&gt; &lt;ItemTemplate&gt; &lt;asp:TextBox ID=&#34;idTxt&#34; runat=&#34;server&#34; TextMode=&#34;Number&#34; AutoPostBack=&#34;true&#34; Text=&#39;&lt;%# Bind(&#34;Note&#34;) %&gt;&#39;&gt;&lt;/asp:TextBox&gt; &lt;asp:RegularExpressionValidator ID=&#34;rglExp&#34; ControlToValidate=&#34;idTxt&#34; runat=&#34;server&#34; ForeColor=&#34;Red&#34; ErrorMessage=&#34;* Only Integers!&#34; ValidationExpression=&#34;\d+&#34;&gt;&lt;/asp:RegularExpressionValidator&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:TemplateField HeaderText=&#34;Log&#34;&gt; &lt;ItemTemplate&gt; &lt;img runat=&#34;server&#34; id=&#34;idLog&#34; width=&#34;32&#34; height=&#34;32&#34; src=&#39;&lt;%# Eval(&#34;Icon&#34;) %&gt;&#39; /&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;/Columns&gt; &lt;/asp:GridView&gt; </pre> <p>ASP.NET side of the code: </p> <pre class="brush: vb"> Protected Sub SaveAllGrid() Dim strNote As String Dim qty As Integer Dim WorkOrderItemID As Integer = 0 For i = 0 To GridView1.Rows.Count - 1 strNote = DirectCast(GridView1.Rows(i).FindControl(&#34;idTxt&#34;), TextBox).Text Session(&#34;WorkOrderItemID&#34;) = Convert.ToInt32(DirectCast(GridView1.Rows(i).FindControl(&#34;lblWorkOrderItemID&#34;), Label).Text) qty = Convert.ToInt32(DirectCast(GridView1.Rows(i).FindControl(&#34;idQty&#34;), Label).Text) WorkOrderItemID = Convert.ToInt32(DirectCast(GridView1.Rows(i).FindControl(&#34;lblWorkOrderItemID&#34;), Label).Text) Dim chkIsComplete As CheckBox = DirectCast(GridView1.Rows(i).FindControl(&#34;chkComplete&#34;), CheckBox) Dim intLog As Byte = 0 If strNote = &#34;&#34; Then strNote = 0 Session(&#34;strNote&#34;) = Convert.ToInt32(strNote) Session(&#34;Qty&#34;) = Convert.ToInt32(qty) - Convert.ToInt32(strNote) If Convert.ToInt32(strNote) = 0 And Convert.ToInt32(strNote) &lt;= Convert.ToInt32(qty) Then intLog = IconType.OPEN ElseIf Convert.ToInt32(strNote) &gt; Convert.ToInt32(qty) Then intLog = 9 &#39; If vbYes = mdMessageBox.mdMessageBox(&#34;You are receiving more than what is available. Are you sure you want to continue for WorkOrderItemID=&#34; &amp; WorkOrderItemID &amp; &#34;?&#34;, &#34;Confirm&#34;, MessageBoxIcons.Question, MessageBoxButtons.YesOrNo, MessageBoxStyle.StyleA) Then &#39; intLog = IconType.OVERSHIPPED &#39; Else &#39; intLog = IconType.OPEN &#39; End If ElseIf Convert.ToInt32(strNote) = Convert.ToInt32(qty) Then intLog = IconType.COMPLETE chkIsComplete.Checked = True ElseIf chkIsComplete.Checked = True Then intLog = IconType.COMPLETE : chkIsComplete.Checked = True ElseIf Convert.ToInt32(strNote) &gt; 0 And Convert.ToInt32(strNote) &lt;= Convert.ToInt32(qty) Then intLog = IconType.OPEN Else intLog = IconType.BLANK End If ExecuteNonQuery(&#34;Update tblWorkOrderItem Set tblWorkOrderItem.Note=&#39;&#34; &amp; Convert.ToString(strNote) &amp; &#34;&#39;,tblWorkOrderItem.IconType=&#34; &amp; intLog &amp; &#34;,tblWorkOrderItem.IsComplete=&#34; &amp; chkIsComplete.Checked &amp; &#34; Where WorkOrderItemID=&#34; &amp; Convert.ToInt32(Session(&#34;WorkOrderItemID&#34;)) &amp; &#34;&#34;) ExecuteNonQuery(&#34;Update tblWorkOrder Set [tblWorkOrder].SimplyIgnore=true Where WorkOrderID=&#34; &amp; Convert.ToInt32(Session(&#34;ID&#34;)) &amp; &#34;&#34;) ClientScript.RegisterStartupScript(Me.GetType(), &#34;PopupScript&#34;, &#34;alert(&#39;Update tblWorkOrderItem Set tblWorkOrderItem.Note=&#39;&#34; &amp; Convert.ToString(strNote) &amp; &#34;&#39;,tblWorkOrderItem.IconType=&#34; &amp; intLog &amp; &#34;,tblWorkOrderItem.IsComplete=&#34; &amp; chkIsComplete.Checked &amp; &#34; Where WorkOrderItemID=&#34; &amp; Convert.ToInt32(Session(&#34;WorkOrderItemID&#34;)) &amp; &#34;&#39;)&#34;, True) Next i GridView1.EditIndex = -1 Bind_Data() </pre>https://www.aspforums.net:443/Threads/646814/Retrive-OLE-Object-from-Access-Database-and-display-in-GridView-using-VBNet-in-ASPNet/https://www.aspforums.net:443/Threads/646814/Retrive-OLE-Object-from-Access-Database-and-display-in-GridView-using-VBNet-in-ASPNet/Tue, 08 Aug 2017 11:15:30 GMT