Not exactly sure what you are trying to do, so this only answer a part of your question.
If you want the first two numbers from the string
string link = "123,234,567,1,44,55,66,77"
you can use regular expressions. See this link for more info:
Regular Expressions Tutorial[
^]
In this case it is a pretty easy regex.
using System.Text.RegularExpressions;
int no1 = 0;
int no2 = 0;
Regex rx = new Regex(@"(?<no1>\d+)\s*,\s*(?<no2>\d+)");
Match m = rx.Match(link);
if (m.Success)
{
no1 = int.Parse(m.Groups["no1"].Value);
no2 = int.Parse(m.Groups["no2"].Value);
}
else
{
}
You can find many sources for reading and writing data to and from a database. Just use your favorite search engine.
Here are some examples:
Beginners guide to accessing SQL Server through C#[
^]
W3 Schools - SQL Tutorial[
^]
MSDN - SqlDataAdapter Class[
^]
Dot Net Pearls - C# SqlDataAdapter[
^]