While writing your new post to your blog, you need to highlight a piece of source code. Now, what? Here is a list of 10 online services which could save you.
ToHtml.com by Oleg Parashchenko
The most "usable" online code highlighter service, supports a LOT of different languages including SQL, scripts, ancient language (*asm) and newest (.NET)
Quick HighLighter by Veign
A very easy to use website, supports a lot of languages, including PHP, ASP, VB.NET, C#, Ruby and "robots.txt" <--LOL
CodeColor by Asp.NET Resources
It has not many languages to work with and I don't like the idea to have a popoup window with the final highlighted...
This is a very quick example about OLEDB and read a text (.txt) file using Visual Basic 6.
The text file must be formatted as a simple CSV file with a field separator. Something like this
Test.txt
a;1;Test
b;2;Test
c;3;Test
d;4;Test
Supposing "Test.Txt" is stored in the root of the C: harddrive, the code will look like
----------------------------------------
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cn = CreateObject("ADODB.Connection")
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\;Extended Properties=""text;HDR=No;FMT=Delimited'"""
Set rs = CreateObject("ADODB.Recordset")
rs.Open "SELECT * FROM Test.txt", cn, 0, 1, 1
While Not rs.EOF
Debug.Print rs.Fields(0).Value, rs.Fields(1).Value, rs.Fields(2).Value
rs.MoveNext
Wend
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing
----------------------------------------
Take a look to the connection string
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\;Extended Properties=""text;HDR=No;FMT=Delimited'"""
the Data Source=c:\; is the key. If you...