Question: I using Visual Studio 2010.My problem is; I can not transfer all data in a listbox to SQL Database. 
codes are as follows.

```
    Dim builder As SqlClient.SqlCommandBuilder = New  SqlClient.SqlCommandBuilder(adaptor4)
    Dim insert_komut As New SqlClient.SqlCommand
    datakayit4 = kayit4.Tables("aaaaa").NewRow

    Dim i As Integer

    For i = 1 To ListBox5.Items.Count

        datakayit4("m_fabricno") = ListBox5.Items.Item(i)

    Next

    kayit4.Tables("bakimkaydi").Rows.Add(datakayit4)
    adaptor4.Update(kayit4, "aaaaa") 

```

How can get rid of this problem ?

Thanks in advance .

Answer: 
I also had to do something similar (during a transition period) and used [MiniHttpd: an HTTP web server library](http://www.codeproject.com/KB/IP/minihttpd.aspx). What I had to do was slightly different as I didn't need an httpd rather a way of executing PHP from a C# application. 

It basically references the unmanaged code straight out of the DLL using the file on disk (see PhpAppDirectory.cs).
I have had to do the same thing its really easy to do,

If you just run the php-cgi exe with cmd and a test php file you will see it output

```
C:\Program Files (x86)\PHP>php-cgi c:/xampp/php/test.php
X-Powered-By: PHP/5.3.6
location test.php
Content-type: text/html

relocated

```

That is my example above all you need to do is call php-cgi and read in the response

The first double break is where your headers stop and your output occurs so if you have your console output in a variable E.G `public string phpOutput` then you just need a regex to split it on \n\n but set the count to 1 so it only splits on the first occurrence of \n\n,

E.G

```
Regex.Split(phpOutput, "(\r\n){2,}|\n{2,}|\r{2,}", RegexOptions.ExplicitCapture);

```