Neither can I, but Microsoft apparently thought we shouldn't be able to. Visual Basic .NET Standard Edition doesn't have a Class Library project type. You'd either need to upgrade to VS.NET Professional, or create a new project type by using the Visual Studio scripting system.
The .NET SDK comes with one. I believe it's called Wintalker.
[edit]It's Wintalk. You can find it under \%ProgramFiles%\Visual Studio .NET\Framework SDK\Samples\Applications\Wintalk\ if you have the SDK installed.[/edit]
Include the .NET redistributable in the installation package.
http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/MSDN-FILES/027/001/829/msdncompositedoc.xml&frame=true
Ideally though you should ditch the function I posted and only open the connection one time, loop through and add the new records, and then close. I've given you all the code to do it, so I'll leave this part up to you. :)
Try to avoid using COM components, ADO included, in .NET. The exact same results can be achieved using ADO.NET.
Public Sub CreateMyOleDbCommand(myExecuteQuery As String, _
myConnectionString As String)
Dim myConnection As New OleDbConnection(myConnectionString)
Dim myCommand As New OleDbCommand(myExecuteQuery, myConnection)
myCommand.Connection.Open()
myCommand.ExecuteNonQuery()
MyConnection.Close()
End Sub
The "next record" exists, correct? If you're converting an Excel spreadsheet to an Access database the records wouldn't be there yet, and therefore would need to be created using a SQL INSERT INTO statement.
Order is, in most cases, rather irrelevant when it comes to XML, so I doubt the framework includes built-in methods for rearranging the entries in the XML file.
I don't know how you can consider 20MB "a lot of space" when current hard drives are exceeding the 100GB mark. Even if you're working in an archaic environment with 4GB hard drives chances are there's plenty of space.
In a case like this where no data is ever displayed (as far as I know) I'd suggest using a DataReader object instead, the .Read method returning False if no data has been returned.