|
AS you are very new with this and your code is also saying like that. I would suggest you to read this article first,
Using ADO.NET for beginners[^]
|
|
|
|
|
sumanmks wrote: insertSQL += "workplace, job, skills";
where is the end bracket of fields ???
It should be
"workplace, job, skills)";
|
|
|
|
|
hi sir,
Can i know y there will be a pop up message when i run the project saying that Visual Studio just in-time debugger
|
|
|
|
|
In the browser? or in your debug environment ?
Also can you show the exact message, may be a snap. This would help me what exactly the error might be.
Sometimes if IE script debugging is disabled, it VS prompts an error message... I guess if it is your case..
|
|
|
|
|
hi abhishek
IE script debugging is disabled is my problem can u please tell me how to get rid of this problem.
|
|
|
|
|
I see the thread switched locations, but still blossoms...
Let's wait till it moves again, because I think all the information provided to that guy is totally irrelevant to him.
var question = (_2b || !(_2b));
|
|
|
|
|
Really.. Its a cross post again.
|
|
|
|
|
Two points:
1) You would need to explicitly tell what is the error you are encountering.
2) Your code is highly vulnerable to SQL Injection attacks. You may need to address that first in case you are interested in the safety of your application seriously.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
insertSQL += "workplace, job, skills";
insertSQL += "VALUES ('";
output of above line will be workplace, job, skillsValues ('
so it will give syntax error when executed on database
change your code to
insertSQL += " workplace, job, skills ";
insertSQL += " VALUES('";
always remember to add proper spaces between keywords when u are createng query through code.
|
|
|
|
|
I'm having trouble with a website when it comes to the authorization. I have one site, called GUI, using a webservice, called WS that requires the user to log on using windows autentication.
In the IIS I have set the Directory Security to Integrated windows security (for both the GUI and the WS sites). In my web.config files (for the GUI and the WS) I have the following lines:
<authentication mode="Windows"/>
<identity impersonate="true"/>
When I enter the URL in IE I get prompted for User name and Password, and I'm sure I enter the correct ones but I still get the The request failed with HTTP status 401: Unauthorized. message.
I am running the same web sites on another machine where I use the Enable anonumous access in the IIS and this (of course) works fine.
Does anyone have any idea of what might be the issue here?
|
|
|
|
|
Hi All
i am using Intelligencia.UrlRewriter.dll for Url rewriting..
In web.config this works fine
<rewriter>
<rewrite url="~/products.aspx/books" to="~/products/books.aspx">
http://localhost:3878/products.aspx/books
My problem is
-------------------
<rewriter>
<rewrite url="~/products/books" to="~/products/books.aspx">
http://localhost:3878/products/books
This type is working in my local server but when i upload in FTP
it is not working
http://www.cminfoline.cmlinks.com/products/books---not working
My requirement
-----------------
Actual URL : http://localhost/UrlRewrite/show.aspx?Year=2008
URL Should Look Like : http://localhost/UrlRewrite/2008/
Please help me with this....
Thanks in Advance
Ramkumar
|
|
|
|
|
getramonweb wrote: when i upload in FTP
AFAIK, IIS 6 doesnt support requests without extensions. So any request made without extension, will not be handled properly.
Use an extension and register it with IIS.
|
|
|
|
|
Thanks (it was great help for us)..
Is it possible to do without extension...because you know http://www.dotnetkicks.com/wpf was developed using this..
Ramkumar
|
|
|
|
|
Yes.. I think IIS 7 supports url without extension.
I dont know if there is any fix for this in IIS 6, as MVC does this as well.
|
|
|
|
|
Thanks ..Let me check with this...bye
Ramkumar
|
|
|
|
|
I have a table, some menus and images aligned to the center. When I go to my site with explorer it usually looks great, but in firefox it's not aligned(the problem also occurs in some explorer versions). my site : http://eturim.co.il/he/default.aspx?page=home[^]
do you have any solution?
|
|
|
|
|
Hi...
In IE browser take a width in pixels as default. But in Mozilla u must set in Percentage(%) only. Ex: style="width:30%"
|
|
|
|
|
hi
i am very new to asp.net. It may be the simplest problem to u. but for me it is a bit difficult. I have written a code for inserting the values in the SQLEXPRESS in C#.but not able to insert it. Can Any one help me out. the code is as follows:
protected void Button1_Click1(object sender, EventArgs e)
{
SqlConnection myConnection = new SqlConnection();
myConnection.ConnectionString = @"Data Source=localhost\SQLEXPRESS;" +
"Initial Catalog=testdata;Integrated Security=SSPI";
try
{
myConnection.Open();
Label1.Text = "<b>Server Version:</b> " + myConnection.ServerVersion;
Label1.Text += "<br /><b>Connection Is:</b> " +
myConnection.State.ToString();
string insertSQL;
insertSQL = "INSERT INTO jobseekerinfo (";
insertSQL += "firstname, middlename, lastname, ";
insertSQL += "dob, address, city, state, zip, mobile, phone, engcollege, ";
insertSQL += "enguniversity, engaggergate, pucollege, puuniversity, pumarks,";
insertSQL += "school, scuniversity, scmarks, totalyears, totalmonths,";
insertSQL += "workplace, job, skills";
insertSQL += "VALUES ('";
insertSQL += TextBox1.Text + "', '";
insertSQL += TextBox2.Text + "', '";
insertSQL += TextBox3.Text + "', '";
insertSQL += TextBox29.Text + "', '";
insertSQL += TextBox5.Text + "', '";
insertSQL += TextBox11.Text + "', '";
insertSQL += TextBox12.Text + "', '";
insertSQL += TextBox14.Text + "', '";
insertSQL += TextBox6.Text + "', '";
insertSQL += TextBox15.Text + "', '";
insertSQL += TextBox4.Text + "', '";
insertSQL += TextBox8.Text + "', '";
insertSQL += TextBox9.Text + "', '";
insertSQL += TextBox10.Text + "', '";
insertSQL += TextBox30.Text + "', '";
insertSQL += TextBox31.Text + "', '";
insertSQL += TextBox32.Text + "', '";
insertSQL += TextBox33.Text + "', '";
insertSQL += TextBox34.Text + "', '";
insertSQL += TextBox35.Text + "', '";
insertSQL += TextBox36.Text + "', '";
insertSQL += TextBox18.Text + "', '";
insertSQL += TextBox19.Text + "', '";
insertSQL += TextBox20.Text + "', '";
insertSQL += "')";
SqlCommand cmd = new SqlCommand(insertSQL, myConnection);
int added = 0;
added = cmd.ExecuteNonQuery();
Label1.Text = added.ToString() + " records inserted.";
}
finally
{
myConnection.Close();
Label1.Text += "<br /><b>Connection Is:</b> " +
myConnection.State.ToString();
}
}
Thanks in advance
|
|
|
|
|
Even though this is madness, i think it's going to work when you close the bracket here:
<br />
insertSQL += "workplace, job, skills";<br />
insertSQL+=") ";<br />
insertSQL += "VALUES ('";<br />
and get rid of the comma here:
<br />
insertSQL += TextBox20.Text;<br />
What I really want to say is, before bothering other people, DEBUG your project.
Oh, and once you've done it, and your project inserts your data, read up on sql injection.
And parameterized queries.
And how to store your connection string in web.config.
var question = (_2b || !(_2b));
|
|
|
|
|
what is the error message?
|
|
|
|
|
hi sir,
there r no syntax errors
|
|
|
|
|
For crying out loud man, your t-sql is totally out of whack.
There might not be any syntax error in your C# project, all it sees is building a string for the most part.
What is the exception caught?
Did you debug it?
I bet the farm though, your insert statement has been built incorrectly, because one can plainly see that looking at it. As i said, close the damn bracket and get rid of the comma, would you?
Oh yeah, sorry.
I hadnt noticed you're not even CATCHING the exception.
Well, good luck--
var question = (_2b || !(_2b));
|
|
|
|
|
<code>insertSQL += "workplace, job, skills)";
insertSQL += "VALUES ('";
you missed the )
|
|
|
|
|
Should I use my invisibility to fight crime or for evil.
Look at the first reply, Captain Obvious.
And my next one.
And at the end of his insertSQL+= crap, see that there's an unnecessary comma being sent along with the rest of the T-SQL.
Ok, that's it.
var question = (_2b || !(_2b));
|
|
|
|
|
It may be a sytex error
1) Ensure ur column names r right
2) compare front end values with database datatype.
|
|
|
|
|