Click here to Skip to main content
15,916,293 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Do we assume that the front end software prepared in C# is a server application and sqlexpress is the client application...?
Do in each and every application communicating with another software client-server conception is to be assumed. And unless it you can't do anything regarding communication.

What I have tried:

Nothing much...just studied named pipes required for inter-process communication.
Posted
Updated 10-Apr-22 1:32am
Comments
Richard MacCutchan 10-Apr-22 7:33am    
No, you don't assume anything, you study and learn.
PIEBALDconsult 10-Apr-22 12:20pm    
The user cares not about architecture.

Why the heck are you fannying around with pipes and so forth if all you need to do is talk to SQL Server Express?

Why not use the libraries that actually come as part of the .NET framework and save yourself a lot of wheel reinventing?
Then it's trivial:
C#
using (SqlConnection con = new SqlConnection(strConnect))
    {
    con.Open();
    using (SqlCommand cmd = new SqlCommand("SELECT Age, Description FROM myTable WHERE ID = @ID", con))
        {
        cmd.Parameters.AddWithValue("@ID", myTextBox.Text);
        using (SqlDataReader reader = cmd.ExecuteReader())
            {
            while (reader.Read())
                {
                int age = (int) reader["Age"];
                string desc = (string) reader["Description"];
                Console.WriteLine($"{age}\n{desc}");
                }
            }
        }
    }
 
Share this answer
 
Comments
Member 12712527 10-Apr-22 6:56am    
Yes Sir you are true but their must be some idea behind my questions(which are likely to make you a feel of a mess of question)
Member 12712527 10-Apr-22 7:01am    
Sir i am preparing a printviewer app previously told you that. for that reason the end user could be able to connect sql server oracle or any other database with also the libraries provided by microsoft and also the custom function that i'll built for printbuilder
 
Share this answer
 
Comments
Member 12712527 10-Apr-22 8:00am    
Sir regarding sqlbulkCopy object we use functions defined in the said class. but this object works with only sql server. if i need to bulkcopy data from a different database then it will fail.
so i need to design a class which will bulkcopy the data regardless of database. to be said clearly i need to design my own bulkcopy class
Richard MacCutchan 10-Apr-22 11:28am    
Please go and read the details in the documentation. You will get nowhere if you keep making guesses based on incorrect assumptions.
Member 12712527 10-Apr-22 8:03am    
Another thing it is not of only the database but any software to which i could communicate...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900