|
i want to use the trip function in such scenerio
SqlConnection conPubs;
SqlCommand sc;
SqlDataReader dr;
conPubs = new SqlConnection("server=localhost;User ID=sa;Password=sasa;database=rescue15");
conPubs.Open();
string str = "SELECT cr_name, Trim(cr_pic), Trim(fing_print) FROM criminal ORDER BY cr_id DESC";
sc = new SqlCommand(str, conPubs);
dr = sc.ExecuteReader();
GridView1.DataSource = dr;
GridView1.DataBind();
but i thing i am not using correct sytax fot Trim() can u guide me in this scenario plz
|
|
|
|
|
Try to write a short subject line for your post. Putting the entire question in the subject line makes it too long to be useful.
You can't use C# functions in SQL.
The Trim function is used to remove spaces at the beginning and end of a string. What you need is a function like Substring . Look in the documentation for the SQL syntax of the database you are using.
---
single minded; short sighted; long gone;
|
|
|
|
|
you can use the following query...
string str = "Select cr_name, substring(cr_pic,4,len(cr_pic)-4) from criminal"
“The woods are lovely, dark and deep. But I have promises to keep, and miles to go before I sleep.”
|
|
|
|
|
you can use the following query...
string str = "Select cr_name, substring(cr_pic,4,len(cr_pic)-4) from criminal"
“The woods are lovely, dark and deep. But I have promises to keep, and miles to go before I sleep.”
|
|
|
|
|
i published the website after then on the same machine i tried to create the virtual directory of the same.after creating the virtual directory , i ws browsing the directory in IIS.there while browsing the directory , i got the following error.
Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.
Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.
Soniagupta1@yahoo.co.in
|
|
|
|
|
Go to IIS Manager, Locate you Virtual Directory, Right Click on it then Select Properties, In the Directory Tab -- Click on the Create Button...
then try accessing your site....it may work...
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
diectory tab u mean to say Virtual directory/ directory security?
Soniagupta1@yahoo.co.in
|
|
|
|
|
I asked you to click on the create button in the Directory Tab of the Virtual Directory Properties Window.
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
but there is not create button there in the directory tab
Soniagupta1@yahoo.co.in
|
|
|
|
|
If you are finding remove button in the same directory tab, then click on it and then again click on create button on the same button...
I think it will work..
Girish Kumar Sharma
|
|
|
|
|
still it is not working
Soniagupta1@yahoo.co.in
|
|
|
|
|
Have you created virtual directory in IIS
|
|
|
|
|
yes i have created
Soniagupta1@yahoo.co.in
|
|
|
|
|
After creating virtual directory, now what is the exact error your are getting ?
|
|
|
|
|
i am getting the following error
this problem is occuing after publishing the website
and there occur no prolem when i am creating the virtual direcory of the project folder where code exist as well.
Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.
Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.
Soniagupta1@yahoo.co.in
|
|
|
|
|
check this link.
http://www.velocityreviews.com/forums/t63201-server-application-unavailable.html
If not helpful, plz. ask again...!
|
|
|
|
|
sir i am not getting the concerned question there.can u give me the permalink for the problem that was asked there?or can u elaborate , i mean according to ur understanding what possible problem can be lying , after browsing the virtual directory(a published project).
Soniagupta1@yahoo.co.in
|
|
|
|
|
Sorry, previously i forgot to post this link
http://forums.asp.net/p/1119459/1745283.aspx. Check all the steps as per link.
If still error, then post your problem, error in step wise step. Without knowing all the facts abt application, IIS, Visual studio version, .NET Framework Version; its hard to find the perfect solution...
|
|
|
|
|
When you say it is posted on local host,
do you try to access like localhost keyword, or ip.
http://localhost/virtualdirectory/Default.aspx
http://88.88.88.255/virtualdirectory/Default.aspx
88.88.88.255 if an ip, you can optain your ip by going to www.whatismyip.com
if it is ip based then if you have Router, then you need to set forwarding rules.
And of course don't forget about Firewall, Try to disable maybe it will work, ps. i don't know how to set it, i have disabled mine.
Programing in VisualStudio, when debugging, or running asp.net web sites, VS has it's own Server, and doesn't depend on ISS.
If you still have troble, download apache server, and googleit for adding asp.net support to apache server.
|
|
|
|
|
Sonia Gupta wrote: Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.
Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.
Will this message came in a red color ?
Hit refresh and check your event viewer. It is in control panel of the server. There you can find Application events. Check what is the error you are getting there ? Well, are you using multiple versions of .NET framework on same server ?
|
|
|
|
|
Hello Friends,
Whenever i'm sending mail through my ASP.NET with c# program it's throwing an error given below........
Could not access 'CDO.Message' object.
|
|
|
|
|
I suppose there is either problem in accessing the SMTP Server or problem in sending mails thorugh the SMTP Server. Check whether you are accessing the valid Server....
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
Read this link
http://www.dotnetspider.com/qa/Question13.aspx
It may be helpful 4 you...
Girish Kumar Sharma
|
|
|
|
|
Hi.. Friends !!
I want to refresh my user control after clicking
on button...
Means, I have a shopping cart page, and when I click on 'Add to Cart' button from GridView, I want to reload my 'CartListing' user control on the same page...
Because, When I click on 'add to cart' button, It simply postback the current page, And I can not see the last added product in cart listing user control !!
So, I have to dynamically refresh my 'CartListing' user control...
And I dont know to to refresh it after clickin on button...
So, If you have any idea regarding it, please given me ASAP
Thanks in advance !!
Bye..
Take care.
Regards,
Abhi
|
|
|
|
|
-- Abhi -- wrote: Because, When I click on 'add to cart' button, It simply postback the current page, And I can not see the last added product in cart listing user control !!
This won't be a problem of user control reloading. Web user controls ( ascx files ) are replacement for classical ASP include files. When page posts back, your user control also reloads. If it is not showing the newly added items, that may be some other reason. How you are maintaining the cart ? Is your user control having any cache option set ?
|
|
|
|