Click here to Skip to main content
15,921,905 members
Home / Discussions / C#
   

C#

 
GeneralRe: create a changing in pin code number of atm application in c# Pin
Harvey Saayman18-Sep-08 2:53
Harvey Saayman18-Sep-08 2:53 
AnswerGet out of the programming industry!!! Pin
Harvey Saayman18-Sep-08 2:41
Harvey Saayman18-Sep-08 2:41 
AnswerCreate one yourself. This is very easy. [modified] Pin
John M. Drescher18-Sep-08 2:52
John M. Drescher18-Sep-08 2:52 
Questionquery Pin
lankaudaranga17-Sep-08 20:44
lankaudaranga17-Sep-08 20:44 
AnswerRe: query Pin
Blue_Boy17-Sep-08 21:58
Blue_Boy17-Sep-08 21:58 
AnswerRe: query Pin
Mycroft Holmes17-Sep-08 22:03
professionalMycroft Holmes17-Sep-08 22:03 
AnswerRe: query Pin
Harvey Saayman18-Sep-08 2:47
Harvey Saayman18-Sep-08 2:47 
QuestionHot Mail Contacts Pin
nhss17-Sep-08 20:32
nhss17-Sep-08 20:32 
AnswerRe: Hot Mail Contacts Pin
Mycroft Holmes17-Sep-08 22:20
professionalMycroft Holmes17-Sep-08 22:20 
QuestionTcpClient connects very slow [modified] Pin
Mark Snow17-Sep-08 20:20
Mark Snow17-Sep-08 20:20 
AnswerRe: TcpClient connects very slow Pin
leppie17-Sep-08 22:25
leppie17-Sep-08 22:25 
GeneralRe: TcpClient connects very slow Pin
Mark Snow17-Sep-08 22:38
Mark Snow17-Sep-08 22:38 
GeneralRe: TcpClient connects very slow Pin
leppie17-Sep-08 22:49
leppie17-Sep-08 22:49 
GeneralRe: TcpClient connects very slow Pin
Mark Snow17-Sep-08 23:12
Mark Snow17-Sep-08 23:12 
GeneralRe: TcpClient connects very slow Pin
leppie17-Sep-08 23:49
leppie17-Sep-08 23:49 
QuestionAlpha numeric sorting for dataview/datatable Pin
avtar11117-Sep-08 19:27
avtar11117-Sep-08 19:27 
AnswerRe: Alpha numeric sorting for dataview/datatable Pin
Mycroft Holmes17-Sep-08 22:25
professionalMycroft Holmes17-Sep-08 22:25 
QuestionHow to use adapter when returned by the following function Pin
CPK_201117-Sep-08 19:00
CPK_201117-Sep-08 19:00 
public static SqlDataAdapter CreateSqlDataAdapter(SqlConnection connection)
{
    SqlDataAdapter adapter = new SqlDataAdapter();
    adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;

    // Create the commands.
    adapter.SelectCommand = new SqlCommand(
        "SELECT CustomerID, CompanyName FROM CUSTOMERS", connection);
    adapter.InsertCommand = new SqlCommand(
        "INSERT INTO Customers (CustomerID, CompanyName) " +
        "VALUES (@CustomerID, @CompanyName)", connection);
    adapter.UpdateCommand = new SqlCommand(
        "UPDATE Customers SET CustomerID = @CustomerID, CompanyName = @CompanyName " +
        "WHERE CustomerID = @oldCustomerID", connection);
    adapter.DeleteCommand = new SqlCommand(
        "DELETE FROM Customers WHERE CustomerID = @CustomerID", connection);

    // Create the parameters.
    adapter.InsertCommand.Parameters.Add("@CustomerID", 
        SqlDbType.Char, 5, "CustomerID");
    adapter.InsertCommand.Parameters.Add("@CompanyName", 
        SqlDbType.VarChar, 40, "CompanyName");

    adapter.UpdateCommand.Parameters.Add("@CustomerID", 
        SqlDbType.Char, 5, "CustomerID");
    adapter.UpdateCommand.Parameters.Add("@CompanyName", 
        SqlDbType.VarChar, 40, "CompanyName");
    adapter.UpdateCommand.Parameters.Add("@oldCustomerID", 
        SqlDbType.Char, 5, "CustomerID").SourceVersion = DataRowVersion.Original;

    adapter.DeleteCommand.Parameters.Add("@CustomerID", 
        SqlDbType.Char, 5, "CustomerID").SourceVersion = DataRowVersion.Original;

    return adapter;
}


The above function returns adapter of SqlDataAdapter type. Could anyone suggest on how to use it for InsertCommand, UpdateCommand and DeleteCommand in some other place.
AnswerRe: How to use adapter when returned by the following function Pin
N a v a n e e t h17-Sep-08 20:33
N a v a n e e t h17-Sep-08 20:33 
QuestionWindows Form allows click events on disable buttons ? Pin
nvngyl17-Sep-08 18:57
nvngyl17-Sep-08 18:57 
AnswerRe: Windows Form allows click events on disable buttons ? Pin
Steve Echols17-Sep-08 19:29
Steve Echols17-Sep-08 19:29 
GeneralRe: Windows Form allows click events on disable buttons ? Pin
nvngyl17-Sep-08 19:55
nvngyl17-Sep-08 19:55 
AnswerRe: Windows Form allows click events on disable buttons ? Pin
N a v a n e e t h17-Sep-08 20:56
N a v a n e e t h17-Sep-08 20:56 
QuestionWin32 Shell Lightweight Utility API (shlwapi.dll) wrapper Pin
Paul Selormey17-Sep-08 18:48
Paul Selormey17-Sep-08 18:48 
AnswerRe: Win32 Shell Lightweight Utility API (shlwapi.dll) wrapper Pin
N a v a n e e t h17-Sep-08 20:58
N a v a n e e t h17-Sep-08 20:58 

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.