Click here to Skip to main content
16,014,860 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionI need webparts video examples Pin
md_azy13-Apr-09 2:30
md_azy13-Apr-09 2:30 
AnswerRe: I need webparts video examples Pin
Colin Angus Mackay13-Apr-09 3:10
Colin Angus Mackay13-Apr-09 3:10 
QuestionDrop down list z-index Pin
scar_face13-Apr-09 1:14
scar_face13-Apr-09 1:14 
AnswerRe: Drop down list z-index Pin
Abhishek Sur13-Apr-09 5:04
professionalAbhishek Sur13-Apr-09 5:04 
Questioninsert in sql Pin
ptvce12-Apr-09 23:52
ptvce12-Apr-09 23:52 
AnswerRe: insert in sql Pin
Abhijit Jana12-Apr-09 23:58
professionalAbhijit Jana12-Apr-09 23:58 
GeneralRe: insert in sql Pin
ptvce13-Apr-09 0:02
ptvce13-Apr-09 0:02 
GeneralRe: insert in sql Pin
Colin Angus Mackay13-Apr-09 0:34
Colin Angus Mackay13-Apr-09 0:34 
ptvce wrote:
yes, its in C#.net


ASP.NET is a framework dealing with web applications. It has nothing to do with database access. ADO.NET is the part of the .NET Framework that deals with database access.

If you are wanting to INSERT data using SQL, then don't use a SqlDataAdapter unless it is directly related to the source of the data, which in this case it isn't. In fact, I wouldn't use data adapters at all.

The command Text should probably look something like this:
INSERT INTO myTable (column1, column2, column3) VALUES(@column1, @column2, @column3)


Replacing myTable, columnX and @columnX with the approproate table name, column names, and parameter names.

You will also have to create parameters to put the data that you want to insert into the query.
cmd.Parameters.AddWithValue("@column1", myValue);


When you are done, use cmd.ExecuteNonQuery() rather than with a DataAdapters. You can't fill anything with an INSERT statement. Only SELECT.


AnswerRe: insert in sql Pin
pra.chaudhari13-Apr-09 0:33
pra.chaudhari13-Apr-09 0:33 
GeneralRe: insert in sql Pin
Colin Angus Mackay13-Apr-09 0:35
Colin Angus Mackay13-Apr-09 0:35 
GeneralRe: insert in sql Pin
ptvce13-Apr-09 0:55
ptvce13-Apr-09 0:55 
GeneralRe: insert in sql Pin
Colin Angus Mackay13-Apr-09 1:11
Colin Angus Mackay13-Apr-09 1:11 
GeneralRe: insert in sql Pin
ptvce13-Apr-09 1:36
ptvce13-Apr-09 1:36 
GeneralRe: insert in sql Pin
Colin Angus Mackay13-Apr-09 1:44
Colin Angus Mackay13-Apr-09 1:44 
QuestionSession Active Problem Pin
pra.chaudhari12-Apr-09 23:44
pra.chaudhari12-Apr-09 23:44 
AnswerRe: Session Active Problem Pin
Abhijit Jana12-Apr-09 23:54
professionalAbhijit Jana12-Apr-09 23:54 
GeneralRe: Session Active Problem Pin
pra.chaudhari13-Apr-09 0:03
pra.chaudhari13-Apr-09 0:03 
Questionhow to implement rss feed in my news website Pin
Qaiser Naqvi12-Apr-09 22:56
Qaiser Naqvi12-Apr-09 22:56 
AnswerRe: how to implement rss feed in my news website Pin
Abhijit Jana12-Apr-09 23:13
professionalAbhijit Jana12-Apr-09 23:13 
AnswerRe: how to implement rss feed in my news website Pin
Parwej Ahamad12-Apr-09 23:16
professionalParwej Ahamad12-Apr-09 23:16 
QuestionProblem in Dynamically Created Table row [modified] Pin
suzzain12-Apr-09 22:16
suzzain12-Apr-09 22:16 
AnswerRe: Problem in Dynamically Created Table row Pin
Parwej Ahamad12-Apr-09 23:10
professionalParwej Ahamad12-Apr-09 23:10 
GeneralRe: Problem in Dynamically Created Table row [modified] Pin
suzzain12-Apr-09 23:33
suzzain12-Apr-09 23:33 
Questioncustom validator in gridview Pin
Rahul Gharat12-Apr-09 21:39
Rahul Gharat12-Apr-09 21:39 
QuestionJSON Pin
Ramkumar_S12-Apr-09 20:38
Ramkumar_S12-Apr-09 20:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.