|
Why would your stored proc include a drop statement ? This looks messy to me, it certainly looks wrong.
The first intelligent thing to do, is to run the proc inside your DB, so you can check if the proc is broken, or the code is broken. The code looks OK to me.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Why dont you write a bit cleaner ?
OdbcConnection con=new OdbcConnection(connectionstring);
cmd=new OdbcCommand ("addloc2",con);
cmd.CommandType = CommandType.StoredProcedure;
OdbcParameter pLoc = new OdbcParameter("_loc",OdbcType.VarChar);
pLoc.Value = "nagpur";
cmd.Parameters.Add(pLoc);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
rinku soni 23 wrote:
===================store procedure is=================
ELIMITER $$
and hey where is D in the line ??
Is it what you are missing
|
|
|
|
|
I used the following code for updating a record in gridview
protected void gvcmem_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
string sMemberID=gvcmem.DataKeys[e.RowIndex].Values["nMemberID"].ToString();
TextBox txtnumber=(TextBox)gvcmem.Rows[e.RowIndex].FindControl("txtnumber");
string sMemebername = gvcmem.DataKeys[e.RowIndex].Values["sMemberName"].ToString();
DataView dvUpdate = objGeneral.EditMemberPhoneNumber(sMemberID, sMemebername, string.Empty, txtnumber.Text, string.Empty, "1");
if (dvUpdate[0]["sStatus"].ToString() == "Success")
{
lblmess.Text = "Member Details Updated Sucessfully";
lblmess.Visible = true;
}
else
{
lblmess.Text = dvUpdate[0]["sStatus"].ToString();
lblmess.Visible = true;
}
gvcmem.EditIndex = -1;
this.loadGrid();
}
while updating when the text in the textbox is changed its not taking the updated text its taking the previous data itself nyone help pls
|
|
|
|
|
What happens when you step through in the debugger ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
the old text is coming in to the textbox but not the updated one
|
|
|
|
|
4anusha4 wrote: the old text is coming in to the textbox but not the updated one
You may be binding the grid on page_load without checking IsPostBack .
|
|
|
|
|
i am not binding it in page_load
|
|
|
|
|
OK. Let me try again. What happens when you step through the debugger ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
there is no error but the record is not updating
|
|
|
|
|
OK, so your datalayer call is being called with the values you expect, but they are not being updated in the database ? Then you need to look at your data layer code to work out why.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
Hi dear all,
i am using the ajax enable web site. i created a master page where i placed Script manager and Update Panel. and a contenat place holder into the Update Panel. the master page have some buttons which is used to display other page(content page).
but when i run this web site and when i click any button it reloads whole page again.it there any setting for this into web.config file or properties of update panel that i have to make.
|
|
|
|
|
I would suggest you download the ASP.NET AJAX samples, run them and then work out why they work and your code does not. Or, read the documentation. If you still can't work it out, post the code here, so people can help you.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Is the button inside the updatepanel ?
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
EnablePartialRendering="true"
I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious.
Vince Lombardi (1913-1970)
|
|
|
|
|
Hi All,
I am facing a proble in ASP.Net 1.0.
The Prob is that I am generating TextBoxes on user input. Like if user input 3 in textbox and click generate button 3 textboxes are added to Table Control (Web Control).
But when I m trying to access its .Text in code behind it is not showing anything..
My code sample is here
''Generate button
For i = 1 To num
Dim r As New TableRow()
Dim c As New TableCell()
Dim txtCaf As New TextBox()
txtCaf.ID = "txtCAF" & i.ToString
txtCaf.Attributes.Add("onkeypress", ONLY_NUMBER)
txtCaf.MaxLength = 10
Dim txtNoOfMDN As New TextBox()
txtNoOfMDN.ID = "txtNoOfMDN" & i.ToString
txtNoOfMDN.Attributes.Add("onkeypress", ONLY_NUMBER)
txtNoOfMDN.MaxLength = 3
c.Controls.Add(New LiteralControl(i))
r.Cells.Add(c)
c = New TableCell()
c.Controls.Add(txtCaf)
r.Cells.Add(c)
c = New TableCell()
c.Controls.Add(txtNoOfMDN)
r.Cells.Add(c)
Table1.Rows.Add(r)
Next
Access its value..
txtCaf = CType(Page.FindControl("txtCaf" & i.ToString), TextBox)
'this show Nothing
Please Help...
Be an Eagle, Sky is Yours.
|
|
|
|
|
Please read the forum guidelines, Please Help is a useless subject line.
Where do you add these controls ? If you add them during page load or later, they will not have any viewstate. they should still exist, assuming you added them before this code. If the access code is in an event, and the code to add is in page prerender, the controls are not there yet. But, I do expect once you find the control, you'll find it has no value.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Sir,
Thanks for your reply..
Controls are added on Button's click event (after page load).
But I want to access its value..
Can you suggest me any idea to do this...
Be an Eagle, Sky is Yours.
|
|
|
|
|
suresh suthar wrote: Controls are added on Button's click event (after page load).
That's the problem. Read about ASP.NET page life cycle and how it uses viewstate to manage the control values. ASP.NET won't maintain viewstate for controls that are created on page_load .
|
|
|
|
|
Like Navaneeth said. The buttons you added on one click, will disappear in the next one. Your best bet is to abandon ASP.NET 1.0, although the problem persists in up to date versions of the framework, there are more appropriate events you can hook into. Any tutorial you find online may well tell you to hook into events you don't even have.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi,
My Sqlserver in on a local windows 2003server which is connected in Lan and
internet connection is through
Router
And i have to access its Database through internet or Remote connection.
Suppose my internet provider ip address is 192.178.12.101 and
My local windows server 2003 lan ip address is 192.148.1.86
So what will be my connection string
Thanking You
email add: manish.m.meshram@gmail.com
|
|
|
|
|
you need to expose your database to the internet. Then it's the IP address of your machine on the internet. The local address is worthless.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hello
I do not find any article in your blog about
"connection to local sqlserver through internet"
Take an example
In textbox i am giving "tcp:192.168.1.81,1433"
string conn = "Data Source=" + @textbox.Text + @"\CCSSQLSERVER2005;Initial Catalog=CCSHMSDNET;Integrated Security=True";
My local machine is in network, i have to access it through
Router by internet
email add: manish.m.meshram@gmail.com
|
|
|
|
|
OK, I finally have a client that wants me to deploy a web app (all my previous clients have only wanted the files, and they would take the responsibility of loading them onto the server.) Anyway, I have never done this before, and I seem to be having some difficulties. It could be a problem with the hoster (Earthlink), but I want to make sure that I'm doing everything correctly before I start complaining to the hoster.
I am first uploading a super simple, almost Hello World app. As I understand it, the only files I really need are:
Default.aspx (or whatever the page is named)
Web.config
the code behind DLL
When I do a deployment from Visual Studio, the first 2 files are in the top directory, and there is the /bin subdirectory with the DLL, and also a Program Debug Database (that I obviously I would not want to have, unless I were debugging the app.) Anyway, I used the Deployment menu item and FTP'd it to the server with no problem; the files were in the same relative subdirectory system on the server.
I try to go to the URL of the Default.aspx, and I get the message:
The requested URL /default.aspx was not found on this server.
I would think that if there was some problem with the DLL being in the wrong directory (e.g., maybe it should go in the top level dir?), that at least the ASPX file would load up, just with nothing happening, or some ugly message, if I did anything. I am not even getting that, so I think it is a problem with the hoster.
So anyway, I'd like to know if I have at least done everything on my end correctly. Thanx
|
|
|
|
|
Is IIS set up to run ASP.NET ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|