Click here to Skip to main content
15,943,798 members
Home / Discussions / Database
   

Database

 
AnswerRe: How extract the numbers only in SQL Pin
Frank Kerrigan27-Apr-06 3:26
Frank Kerrigan27-Apr-06 3:26 
QuestionIs UDF slow? Pin
devvvy26-Apr-06 15:15
devvvy26-Apr-06 15:15 
AnswerRe: Is UDF slow? Pin
Colin Angus Mackay26-Apr-06 20:16
Colin Angus Mackay26-Apr-06 20:16 
AnswerRe: Is UDF slow? Pin
Frank Kerrigan27-Apr-06 3:14
Frank Kerrigan27-Apr-06 3:14 
Questionbreadcrump to xml tree - categorypathes to treeview Pin
starlight7126-Apr-06 11:03
starlight7126-Apr-06 11:03 
QuestionReporting Service / SQL 2005 Pin
devvvy26-Apr-06 4:19
devvvy26-Apr-06 4:19 
QuestionSQL Connection problems Pin
achrafus26-Apr-06 2:28
achrafus26-Apr-06 2:28 
QuestionInsert in a table Pin
alee15.10.8826-Apr-06 1:17
alee15.10.8826-Apr-06 1:17 
Hi everyone,

I have a small problem which I really need to solve today. I am doing a program which the user needs to log in. Now, when the user clicks the login btn, the username of that particular user is saved in a table called Marks.

Then a new form is opened in which the user can do a small exam and finally submit it. When he clicks the submit btn the mark is saved in the table, in the column called subjectMarks, near the username which was already saved before (in the column userName).

Unfortunately it is working wrong since the username is saved in the first row and then the mark is saved in the 2nd row.

How can I do it?

The following is the code I used in the submit btn:

string query = ("INSERT INTO Marks (" + subjectMarks + ") VALUES ('" + marks + "')");

OleDbCommand myCommand = new OleDbCommand(query);
myCommand.Connection = myConnection;

try
{
myCommand.ExecuteNonQuery();
}
catch(Exception ex)
{
ex.ToString();
}






Thanks
AnswerRe: Insert in a table Pin
Colin Angus Mackay26-Apr-06 2:53
Colin Angus Mackay26-Apr-06 2:53 
AnswerRe: Insert in a table Pin
Eric Dahlvang26-Apr-06 6:28
Eric Dahlvang26-Apr-06 6:28 
Questionpassing an entire table to a stored procedure for update Pin
randprin25-Apr-06 23:09
randprin25-Apr-06 23:09 
QuestionSQL Server does not exist or access denied Pin
vicky45725-Apr-06 14:15
vicky45725-Apr-06 14:15 
AnswerRe: SQL Server does not exist or access denied Pin
Jerry Hammond25-Apr-06 18:22
Jerry Hammond25-Apr-06 18:22 
GeneralRe: SQL Server does not exist or access denied Pin
vicky45726-Apr-06 5:41
vicky45726-Apr-06 5:41 
QuestionBoth OUTPUT and Records from Sproc Pin
netsurf197025-Apr-06 12:31
netsurf197025-Apr-06 12:31 
Questionsqlexpress 2005 deployment problem Pin
User 91483325-Apr-06 3:15
User 91483325-Apr-06 3:15 
AnswerRe: sqlexpress 2005 deployment problem Pin
Paddy Boyd25-Apr-06 3:19
Paddy Boyd25-Apr-06 3:19 
GeneralRe: sqlexpress 2005 deployment problem Pin
User 91483325-Apr-06 3:44
User 91483325-Apr-06 3:44 
GeneralRe: sqlexpress 2005 deployment problem Pin
Paddy Boyd25-Apr-06 3:46
Paddy Boyd25-Apr-06 3:46 
GeneralRe: sqlexpress 2005 deployment problem Pin
User 91483325-Apr-06 21:07
User 91483325-Apr-06 21:07 
Questionplease help me Pin
manish2424-Apr-06 22:33
manish2424-Apr-06 22:33 
AnswerRe: please help me Pin
CWIZO25-Apr-06 21:46
CWIZO25-Apr-06 21:46 
QuestionHow to create dbs in Sql server 2005? Pin
sivakumarUSTRI24-Apr-06 21:01
sivakumarUSTRI24-Apr-06 21:01 
AnswerRe: How to create dbs in Sql server 2005? Pin
Frank Kerrigan25-Apr-06 0:35
Frank Kerrigan25-Apr-06 0:35 
AnswerRe: How to create dbs in Sql server 2005? Pin
Jerry Hammond25-Apr-06 4:42
Jerry Hammond25-Apr-06 4:42 

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.