Click here to Skip to main content
16,006,475 members
Home / Discussions / Database
   

Database

 
GeneralRe: Tracking SQL Server memory usage Pin
AndyG18-Mar-02 4:08
AndyG18-Mar-02 4:08 
GeneralRe: Tracking SQL Server memory usage Pin
19-Mar-02 11:41
suss19-Mar-02 11:41 
QuestionWhere is primary key? Pin
Philip Patrick17-Mar-02 0:37
professionalPhilip Patrick17-Mar-02 0:37 
GeneralADO.NET Pin
Travis D. Mathison16-Mar-02 1:53
Travis D. Mathison16-Mar-02 1:53 
QuestionWhats wrong with this code? Pin
Mazdak15-Mar-02 0:38
Mazdak15-Mar-02 0:38 
AnswerRe: Whats wrong with this code? Pin
James T. Johnson16-Mar-02 20:23
James T. Johnson16-Mar-02 20:23 
GeneralRe: Whats wrong with this code? Pin
Mazdak16-Mar-02 21:24
Mazdak16-Mar-02 21:24 
GeneralRe: Whats wrong with this code? Pin
James T. Johnson16-Mar-02 21:43
James T. Johnson16-Mar-02 21:43 
Mazdak wrote:
I learn ASP.NET like a blind persons,because in my country there is no books about .net topics and I have only some limited internet resources

I've always considered myself lucky in that regard Smile | :) I only mentioned it came from the book because I hadn't actually tried it myself.

Mazdak wrote:
James T. Johnson wrote:
I'm not sure but you may have to assing the Insert, Update, and Delete Commands to the DataAdapter;


How should I do it?


OleDbDataAdapter myAdapter=new OleDbDataAdapter("SELECT Username, Field1, Field2, .... FROM Table2",myConnection);
OleDbCommandBuilder myBuild=new OleDbCommandBuilder(myAdapter);

myAdapter.InsertCommand = myBuild.GetInsertCommand();
myAdapter.UpdateCommand = myBuild.GetUpdateCommand();
myAdapter.DeleteCommand = myBuild.GetDeleteCommand();

DataSet myDataSet=new DataSet();
myAdapter.Fill(myDataSet,"Table2");

// these lines shouldn't be needed anymore because we explicitly defined the fields above
// DataColumn[] keys=new DataColumn[1];
// keys[0]=myDataSet.Tables["Table2"].Columns["Username"];
// myDataSet.Tables["Table2"].PrimaryKey=keys;

[....].
Mazdak wrote:
I don't know how to debug ASP.NET application,In the windows form I put a breakpoint and use F5,But here it does not work

At the top of your ASP.NET page change your Page tag to this <%@ Page Trace="true" ....>

Now when you want to output something for debugging purposes use, Trace.Write(strCategoryName, strValueToOutput); The category name is so that you can see what the value is for.

In your case you would put this before the myAdapter.Update(myDataSet,"Table2");

Trace.Write("myAdapter.InsertCommand.CommandText", myAdapter.InsertCommand.CommandText);

HTH, I'm was just on my way to bed so my brain may be fried :-P

James

Sonork ID: 100.11138 - Hasaki
"Smile your little smile, take some tea with me awhile.
And every day we'll turn another page.
Behind our glass we'll sit and look at our ever-open book,
One brown mouse sitting in a cage."
"One Brown Mouse" from Heavy Horses, Jethro Tull 1978

GeneralRe: Whats wrong with this code? Pin
Mazdak16-Mar-02 23:07
Mazdak16-Mar-02 23:07 
GeneralRe: Whats wrong with this code? Pin
James T. Johnson17-Mar-02 14:50
James T. Johnson17-Mar-02 14:50 
GeneralRe: Whats wrong with this code? Pin
Mazdak17-Mar-02 20:50
Mazdak17-Mar-02 20:50 
GeneralRe: Whats wrong with this code? Pin
James T. Johnson17-Mar-02 21:56
James T. Johnson17-Mar-02 21:56 
GeneralRe: Whats wrong with this code? Pin
Mazdak17-Mar-02 22:21
Mazdak17-Mar-02 22:21 
GeneralRe: Whats wrong with this code? Pin
James T. Johnson17-Mar-02 22:28
James T. Johnson17-Mar-02 22:28 
GeneralRe: Whats wrong with this code? Pin
Mazdak17-Mar-02 22:41
Mazdak17-Mar-02 22:41 
QuestionHow to connect to MicroSoft Access without creating a DSN in Control Panel? Pin
14-Mar-02 22:48
suss14-Mar-02 22:48 
AnswerRe: How to connect to MicroSoft Access without creating a DSN in Control Panel? Pin
Mazdak15-Mar-02 0:16
Mazdak15-Mar-02 0:16 
GeneralRe: How to connect to MicroSoft Access without creating a DSN in Control Panel? Pin
15-Mar-02 4:04
suss15-Mar-02 4:04 
GeneralADO.NET Pin
Mazdak14-Mar-02 4:31
Mazdak14-Mar-02 4:31 
GeneralRe: ADO.NET Pin
Andres Manggini16-Mar-02 16:39
Andres Manggini16-Mar-02 16:39 
GeneralRe: ADO.NET Pin
Mazdak16-Mar-02 19:59
Mazdak16-Mar-02 19:59 
GeneralRe: ADO.NET Pin
Mazdak16-Mar-02 20:40
Mazdak16-Mar-02 20:40 
GeneralRe: ADO.NET Pin
James T. Johnson16-Mar-02 21:20
James T. Johnson16-Mar-02 21:20 
GeneralRe: ADO.NET Pin
Mazdak16-Mar-02 21:30
Mazdak16-Mar-02 21:30 
GeneralRe: ADO.NET Pin
James T. Johnson16-Mar-02 21:44
James T. Johnson16-Mar-02 21:44 

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.