|
If i am writing that line i am getting the following error
value of type 'SystemData.DataTableCollection' can not be converted to string
Prakash Mishra(Banglore,India)
|
|
|
|
|
What exactly is the line which you have used?
Apurva Kaushal
|
|
|
|
|
ID = ds3.Tables[0].Rows[0]["Cand_Id"].ToString()
Prakash Mishra(Banglore,India)
|
|
|
|
|
Is ID is of string type?
put like this:
string ID = ds3.Tables[0].Rows[0]["Cand_Id"].ToString()
Apurva Kaushal
|
|
|
|
|
Thanks Apurva for being so patient. Yes its of type string
In the statement ds3.Tables[0].Rows[0]["Cand_Id"].ToString(). Its asking for identifier expected in statement
ds3.Tables[0]
below[0]. Is is a synatx prob i am using VB
Prakash Mishra(Banglore,India)
|
|
|
|
|
In vb.net it will be like this:
ID = ds.Tables(0).Rows(0)("ID").ToString()
Apurva Kaushal
|
|
|
|
|
THANKS APURVA
I TRIED WITH ROUND BRACKET AND IT WORKED. THANKS FOR BEING SO NICE TO ME. THANKS A LOT.
REGARDS
Prakash Mishra(Banglore,India)
|
|
|
|
|
Always welcome..
Apurva Kaushal
|
|
|
|
|
Hai friends..
I am new to asp.net.I would like to know how to Redirect from one URL to another URL.My problem is that i upload my project in server.suppose, www.firstproject.com is the website name ,in that project there is link to go to www.secondproject.com.....(these two works are uploaded in 2 different server).But it is not working with my code....How to do that????any idea please help me....am using .NET 1.1 version and c# coding......
Thanks in advance
|
|
|
|
|
Response.Redirect() will serve the purpose for you.
Apurva Kaushal
|
|
|
|
|
Thanks for your reply.
But Actually my problem is different ,i dont want to redirect from one page to another page in the same project.Instead of that ,i want to redirect from one website to another site...for example www.yahoo.com to www.rediffmail.com
|
|
|
|
|
That will work fine with that also. You can redirect to another site also.
Apurva Kaushal
|
|
|
|
|
Thanku very much for your confident reply
I try Response.redirect withot using http in first time
But after your reply i try with http (ie,Response.redirect("http://www.xyz.com");
now my case is working fine.
Thanks once again
|
|
|
|
|
Always welcome..
Apurva Kaushal
|
|
|
|
|
Use, Response.Redirect("testpage.aspx");
will help you.
where the testpage is the page where you want to redirect page.
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
Thanks for your reply.
But Actually my problem is different ,i dont want to redirect from one page to another page in the same project.Instead of that ,i want to redirect from one website to another site...for example www.yahoo.com to www.rediffmail.com
|
|
|
|
|
it will work. please try it. it is working fine for me.
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
Thanku very much for your confident reply
I try Response.redirect withot using http in first time
But after your reply i try with http (ie,Response.redirect("http://www.xyz.com");
now my case is working fine.
Thanks once again
|
|
|
|
|
Glad to help always.
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
hello ,
In the button there will be one property onclientclick.
on clientclick = javascript:redirectpage();
function redirectpage()
{
navigate('http://www.rediffmail.com');
return false;
}
Do like this it will work
ok byeee
Murali
|
|
|
|
|
Hi,
I'm currently pulling out my hair with what can only be described as completely random Unhandles Exception errors. They don't occur all of the time, but seem to when I need them not too, i.e. in front of colleges and not even custom errors catch them for some reason.
They appear to occur when connecting to databases, and I cringe everytime I see my application attempt to connect to one. There is litterally no other information I can give because I simply don't get any.
It can't be my code because sometimes it works and sometimes it doesn't. (I'm using MS Access). I've tried asking my host and they brush it off and say we can get our technicians to have a look, for £60 per half hour... this is Fasthosts who are a complete waste of time.
Any ideas?
Thanks
|
|
|
|
|
Aaron Hudson wrote: There is litterally no other information I can give because I simply don't get any.
Then you have to make sure that you get it. The excpetion contains a lot of information on where and why it was thrown. Without that information, the best anyone can give you is guesswork.
Any code that depends on something that you don't have full control over, should have it's own error handling. When you catch the exception, you can display all the information in it.
---
single minded; short sighted; long gone;
|
|
|
|
|
It seems to be when the Access database is opened.
Is this most likey to be an Access, .NET or IIS issue?
Cheers
|
|
|
|
|
Ok, I get this from Matrix (I use a Fasthosts dedicated server)
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 7/16/2007 7:19:29 PM
Event time (UTC): 7/16/2007 6:19:29 PM
Event ID: b910cc78da5f47c29371c31cf48216dc
Event sequence: 21
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/3/ROOT-1-128290830698125000
Trust level: Full
Application Virtual Path: /
Application Path: D:\home\
Machine name: DSVR004315
Process information:
Process ID: 1540
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: OleDbException
Exception message: Unspecified error
Request information:
Request URL: http://www.enterprise-learning-gateway.co.uk/project.aspx
Request path: /project.aspx
User host address: 212.132.0.11
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread information:
Thread ID: 9
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at ASP.project_aspx.__Render__control2(HtmlTextWriter __w, Control parameterContainer) in D:\home\project.aspx:line 70
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer)
at ASP.project_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in D:\home\header.aspx:line 34
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Page.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Custom event details:
Any ideas?
|
|
|
|
|
The connection fails with the error message "Unspecified error".
The most common reason for this is when you run out of available connections because you haven't closed the previous connections properly.
The database driver only allows 64 simultaneous connections to the database. If you don't close the connections properly, they will remain open until the connection itself times out. When there are 64 connections already open, the database will not accept more connections.
The typical behaviour for this problem is that the database stops accepting connections for a few minutes, then starts working again when one of the connections times out.
---
single minded; short sighted; long gone;
|
|
|
|