Saturday, March 24, 2012
Please help ! Server Error in Application ! Object variabl
I havent solved my problem yet.
I was wondering if it has something to do with database locks. I checked for
any locks, but couldnt find any at the time of the error.
I have no idea how to solve this problem.
Please let me know if you come across any solutions.
Thanks
majo
"rogercnorris@dotnet.itags.org.yahoo.com" wrote:
> Did you ever resolve this issue? I'm currently experiencing something
> similar. An ASP.NET application was running fine on a Windows XP
> machine. But now that we've moved it to Windows Server 2003, it
> *sometimes* gets the error that you described:
> System.NullReferenceException: Object variable or With block variable
> not set.
> at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object
> o, Type objType, String name, Object[] args, String[] paramnames,
> Boolean[] CopyBack)
> This is while accessing a COM object. Once again, it's worked
> flawlessly on XP for quite a while now, but seems to occasionally have
> problems on Windows Server 2003 (maybe the operating system isn't the
> main issue, but I don't know what other differences exist).
> - Roger
>Hi,
This time, I got a new Server Error
"Fill: selectcommand.connection property has not been initialized" in
another asp page. This also comes only ONCE IN A WHILE.
The error is coming in the line with "Fill" in the code given below
*--
DBConnection = OnlineConn.OnlineDBConnection(Database)
Sql = KeyWord
Dim SqlCommand As New SqlCommand(Sql, DBConnection)
Dim SqlAdapter As New SqlDataAdapter(SqlCommand)
Dim DataSet As New DataSet
SqlAdapter.Fill(DataSet)
*--
While linking this with my previous error " Object variable with block ... "
, I was wondering if this error has anything to do with the database
connection.
Will this happen if the asp.net page is refreshed frequently ?
Thanks in advance for your help
Rgds,
Majo
"majo" wrote:
> Hi Roger,
> I havent solved my problem yet.
> I was wondering if it has something to do with database locks. I checked f
or
> any locks, but couldnt find any at the time of the error.
> I have no idea how to solve this problem.
> Please let me know if you come across any solutions.
> Thanks
> majo
>
> "rogercnorris@.yahoo.com" wrote:
>
Hi,
I created a new virtual directory in IIS and xcopied the whole content
(which is giving me the server error)
Right at the moment when i got the server error in my initial application, i
tried the new application which was created by me and it WORKED WELL.
Does this mean, that this server error has nothing to do with database locks
or IIS ?
I think, it has something to do with concurrent connections.
Can anyone help me with the connection parameters which i should use.
Many thanks...
Wednesday, March 21, 2012
please help me for this problem, as I havent done it before.
Hi, all
I want help for the below mentioned problems. PLease give example with source code. Please help me.
1. I have made upto this point. Now i want the functionality that when i enter the item orderd and discount the amount column should be updated as per the
following formula.
amount = rate*item orderd - discount
2. As the amount column updated the sub total should be changed.
3. as the user enter the taxes the grand total should also be changed.
Regards
sp_412000@dotnet.itags.org.yahoo.com
<%@dotnet.itags.org. Import Namespace="System.Data" %>
<%@dotnet.itags.org. Import Namespace="System.Data.OleDb" %>
<script runat="server" language="C#">
void Page_Load(Object src,EventArgs e)
{
OleDbConnection dbConn =
new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=/studynet/Authors2k.mdb;User Id=admin;Password=;" );
OleDbDataAdapter dbAdap = new OleDbDataAdapter("SELECT item_id,item_name,unit,rate,stock FROM product",dbConn);
DataSet ds = new DataSet();
dbAdap.Fill(ds,"product");
rept.DataSource = ds.Tables["product"].DefaultView;
rept.DataBind();
}
</script>
<html>
<form id="form1" runat="server">
<asp:repeater id="rept" runat="server">
<HeaderTemplate>
<table>
<tr>
<th>Del</th>
<th>Item #</th>
<th>Name</th>
<th>Unit</th>
<th>Rate</th>
<th>Item Ordered</th>
<th>Discount</th>
<th>Amount</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<asp:CheckBox id="chk1" runat="server" />
</td>
<td>
<%# DataBinder.Eval(Container.DataItem,"item_id") %>
</td>
<td>
<%# DataBinder.Eval(Container.DataItem,"item_name") %>
</td>
<td>
<#% DataBinder.Eval(Container.DataItem,"unit") %>
</td>
<td>
<#% DataBinder.Eval(Container.DataItem,"rate") %>
</td>
<td>
<asp:textbox id="txt1" runat="server" />
</td>
<td>
<asp:textbox id="txt2" runat="server" />
</td>
<td>
<asp:textbox id="txt3" runat="server" />
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:repeater>
sub total: <asp:textbox id="subtot" runat="server" />
Taxes: <asp:textbox id="taxes" runat="server" />
Grand Total: <asp:textbox id="gtot" runat="server" />
</form>
</html>
If you want it to be "automatic" then you would add a onchange eventfor the textboxes and have them do the approproate math when the textchanges
HTH