1
Answer

how to get dynamic ip of router in c#

x _sanctus

x _sanctus

19y
4k
1
Please help, i want to create application running on server. This application get dynamic ip from router connected to server. How can i get the dynamic ip? I have founded that there are many example like trace route program but all of them in c++ and in dont know how to convert it into c# program.
Answers (1)
0
Daniel

Daniel

NA 4 9.9k 14y
        private void cmdSearch_Click(object sender, EventArgs e)
        {
            SqlConnection sqlNWConn = new SqlConnection();
            SqlDataAdapter daCustomers;
            DataSet dsCustomers;
            String tableName = "Customers";

            sqlNWConn = new SqlConnection(@"Data Source=DANS-MAC--WIN7\SQLEXPRESS;Initial Catalog=Northwind;Integrated Security=True");

                    if (radioAll.Checked == true)
                    {
                        try
                        {
                            sqlNWConn.Open();
                            dsCustomers = new DataSet();                                                // Creates a new DataSet
                            daCustomers = new SqlDataAdapter("select * from Customers", sqlNWConn);     // Creates a new SqlDataAdapter with select command and connection
                            SqlCommandBuilder cmdBldr = new SqlCommandBuilder(daCustomers);             // Fills in insert, update, and delete commands
                            daCustomers.Fill(dsCustomers, tableName);                                   // Fills the dataset
                            dataGridCustomers.DataSource = dsCustomers;
                            dataGridCustomers.DataMember = tableName;
                        }
                        catch
                        {
                            MessageBox.Show("there was an error and your code is crap"); // error will be changed when working
                        }
                    }

                    if (radioName.Checked == true)
                    {
                          // Searches value in txtSearch in table Customer ContactName
                    }
          }
0
Sam Hobbs

Sam Hobbs

NA 28.7k 1.3m 14y
You seem to be feeling panicked. Have a little fun with Database Table Update in a DataGridView without Writing Code.