.NET walkabout
posts - 12, comments - 21, trackbacks - 0

My Links

News - Two steps ahead

↑ Grab this Headline Animator

Tag Cloud


Post Categories

Code repository websites


ottobre 2007 Entries

10 source code highlighters

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. 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...

posted @ martedì 16 ottobre 2007 3.16 | Feedback (3) | Filed Under [ ASP.NET ASP VbScript Visual Basic ]

OLEDB and text files

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...

posted @ domenica 7 ottobre 2007 20.00 | Feedback (0) | Filed Under [ Visual Basic OLEDB ]

Powered by: