|
Hello All...
I am haveing one doubt on my project when i try
to run my project its shows some error
Error while try to run project:Unable to start project debugging
on the web server. The project is not configured to be debuged.
so kindly solve this problem and tell me solution.as early as possible
Many thanks Advance.
Dhulipudi
-- modified at 22:53 Wednesday 23rd August, 2006
hai all please clarify my doubt
|
|
|
|
|
use ctrl+F5 it will run the project
but not in debug mode
Navi
|
|
|
|
|
check this link:
http://support.microsoft.com/kb/306156/EN-US
Neeraj
|
|
|
|
|
I need to create an ASP.NET server side application that will retrieve a MS Word document stored in a MS SQL Server table and then manipulate the document and finally send the document to the requesting user.
I have figured out how to open a DOC file that is stored on the file system using the Word.Application.Documents.Open() method. I also know how to Add a new empty document to the Documents collection. But I can not figure out how to open a document where the content is retrieved from a database table.
Thanks in advance for any help.
spg
|
|
|
|
|
This will help you out,
Onclick event of an linkbuttton (which has file name as text) write this code(change variable names etc...)
sFullFilePath is the file path (Retrieved from database table)
System.IO.FileInfo oFileInfo = new System.IO.FileInfo(sFullFilePath);
if(oFileInfo.Exists)
{
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=" +
sOrigFilename);
Response.AddHeader("Content-Length", oFileInfo.Length.ToString());
Response.ContentType = "application/octet-stream";
Response.WriteFile(sFullFilePath);
Response.End();
}
else
{
lblMessage.Text = "The file cannot be found.";
}
Ram
|
|
|
|
|
Ram,
Thank you for your response. Maybe I didn't make myself clear enough. The database does not contain the path to a document it actually contain the binary image of the document. I do not want to read the file from the file system, I want to retrieve the binary data from the database and then manipulate the document before sending it to the users browser.
Thanks
spg
|
|
|
|
|
I have a login form which requires a customer's username and password.
From here I can retrieve the primary key of the customer's row in the table.
I want to know display all the customer's details on the new form?
Thank you
Nothing lasts but nothing is lost
|
|
|
|
|
If you have a properly designed and layered application your data layer should have a method to retreive the customer data based on their ID which can be called from any page in the application and used to display.
only two letters away from being an asset
|
|
|
|
|
Thats exactly wat im looking for to be able to call data depending on the customer ID, how would i do that?
thank you
Nothing lasts but nothing is lost
|
|
|
|
|
Solly74 wrote: how would i do that?
Write it
only two letters away from being an asset
|
|
|
|
|
haha i know i must write but not really sure how to?
thanks
Nothing lasts but nothing is lost
|
|
|
|
|
hi
i have this infuriating problem thats driving me up the wall... I took over a project and wrote the frontend for a site however the admin (someone elses effort) keeps breaking, this code below always return 0 ie: i is always null.
<code>
private void Page_Load(object sender, System.EventArgs e)
{
foo.Text += this.createPage( "foo_test", 2, 3, 18131).ToString()+"::";
}
public int createPage(string name, int order, int page_resource_id, int customer_di_id)
{
string query;
query = "INSERT INTO foo (id, ord, name, page_resource_id) VALUES (?id, ?ord, ?name, ?page_resource_id); SELECT LAST_INSERT_ID();";
MySqlConnection con = new MySqlConnection( ConfigurationSettings.AppSettings["database_connstring"].ToString() );
con.Open();
MySqlCommand cmd = new MySqlCommand(query, con);
cmd.Parameters.Add(new MySqlParameter("?name", name));
cmd.Parameters.Add(new MySqlParameter("?ord", order));
cmd.Parameters.Add(new MySqlParameter("?page_resource_id", page_resource_id));
cmd.Parameters.Add(new MySqlParameter("?id", customer_di_id));
object i = null;
i = cmd.ExecuteScalar();
con.Close();
int result = 0;
if (i != null)
{
result = int.Parse(i.ToString());
}
return result;
}
</code>
i have similar code working fine elsewhere (the frontend) but this ALWAYS fails and the reason.... as soon as the id in foo goes above 65535. It works fine up to then, and then always returns 0.
i've stuck it in one page just test it, theres a whole load of other stuff going on but that all fine its just hereand I really dont get it at all. foo.Text is just a label on a blank page again for testing only
if im being incredibly thick please point it out, but ive been staring at this for hours now and cant work it out and cant find anything on google or anywhere.
ta
t
|
|
|
|
|
going_mental wrote: as soon as the id in foo goes above 65535
There is your clue.
The datatype of the id field seems to be a smallint, which has a maximum value of...drum roll please...65535. Try using a mediumint or an int, depending on how large you think the table will grow.
only two letters away from being an asset
|
|
|
|
|
hi mark
if only that was the problem my life would easier.....;)
the frontend uses the same database and table and doesnt have this issue and does a very similar thing ie: inserts a record grabs the last insert id and uses it as a reference in another table.
the id datatype is an int so should be fine.
something somewhere is having issues with it no longer being a smallint but i cant for the life of me se what.
t
|
|
|
|
|
Is the front end inserting into the same table? If so then use that code, if not then compare them and the tables. May sound obvious but it's usually the simple things that cause the problems.
only two letters away from being an asset
|
|
|
|
|
hi mark
the sql is identical, the way its handled in the call for the class is *slightly* different but the problem wasnt there which is why i was getting so confused by it, i thought it was originally but after getting rid of everything bar what was left in the example in my post and still having the problem, just kinda flummoxed me.
the sql doesnt fail (it inserts a record) it just wasnt picking up the last insert id and returning it, guffa's solution to split the queries into two works fine, but i still dont see what would cause it or why it would fail after getting to 65535 as theres nothing that defines a smallint or restricts it to that.
v odd me thinks
thanks
tim
|
|
|
|
|
I see two reasons that might be possible:
1. The driver has problems with returning some data types.
2. The insert query also produces a result, so that you get two results from the call. (This is the case if you would run it in SQL Server.)
Try to run the query that gets the id in a separate call. As long as you use the same connection, you get the right id.
---
b { font-weight: normal; }
|
|
|
|
|
lordy lordy guffa yer a bladdy genius.
it works, but im stil confused as to why it waits till the id's rise above smallint size before barfing.
almost identical code works in the frontend (the two queries run together in one call) and thats fine.
very perculiar, but hey ho hopefully thats the last I'll see of that code (for a while ;0)
thanks again guffa
tim
|
|
|
|
|
Hi,
Is it possible to get the current user's windows login name that is logged in, to a site on the network.
Say we have:
mynetwork/user1
EG: User1 logs in to his pc, he browse to my site, and then I want to capture his login name(username), and use it in my web app...
|
|
|
|
|
me.User.Identity
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
string sUsername;
string sFullUsername = Request.ServerVariables["AUTH_USER"];
Ram
|
|
|
|
|
Hi.
I have an arraylist I populate from a specific field in the database. Say I get the following values:
Mountain
River
gvvv
Highlands
Sea
gvvv
gvvv
Mountain
Mountain
Lake
gvvv
Sea
As you can see I have 'gvvv' more then once in the arraylist. My question is, how can I remove all of the "gvvv" values from the arraylist, once it has been populated. I tried using arrlist.remove() but it did not work.
|
|
|
|
|
Dim intCount As Integer = 0
Do While intCount < arrErrors.Count
If arrErrors(intCount).ToString = "gvvv" Then
arrErrors.RemoveAt(intCount)
else
intCount += 1
End If
Loop
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
Great, it worked - thanks for the help.
|
|
|
|
|
A more appropriate solution would be to not return the unwanted values from the database in the place.
How are you populating the arraylist? You could filter the contents as they are being added by using the Contains method, or filter the dataset.
only two letters away from being an asset
|
|
|
|