I have Zero database knowledge I think, but in VB6 I was able to write regarding a huge number of files I need to create into a database for tracking purposes. I connected to the database like:
Public Sub dbConnect(DataSource As String)
Set dbConnection = New ADODB.Connection
dbConnection.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DataSource & ";Persist Security Info=False")
Set dbRecord = New ADODB.Recordset
dbRecord.CursorType = adOpenKeyset
dbRecord.LockType = adLockOptimistic
dbRecord.Open "docIndexTable", dbConnection, , , adCmdTable
End Sub
And added my records like:
dbRecord.AddNew
dbRecord!DocumentNumber = dbIndex
dbRecord!DocumentTitle = "PlaceHolder"
dbRecord!DocumentRelativePath = PathName
dbRecord!DocumentFilename = FileName
dbRecord!DocumentNeeded = True
dbRecord!SearchKeywords = Null
dbRecord!RelatedDocumentNumbers = Null
dbRecord!DateDocumentLastEdited = Date
dbRecord.Update
I am looking to do the same thing with VB.Net, but so far it has eluded me, and all the examples I can find focus on USING the database. I just need to write to it, never read the data (except by opening Access).
Any help would be appreciated.
Public Sub dbConnect(DataSource As String)
Set dbConnection = New ADODB.Connection
dbConnection.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DataSource & ";Persist Security Info=False")
Set dbRecord = New ADODB.Recordset
dbRecord.CursorType = adOpenKeyset
dbRecord.LockType = adLockOptimistic
dbRecord.Open "docIndexTable", dbConnection, , , adCmdTable
End Sub
And added my records like:
dbRecord.AddNew
dbRecord!DocumentNumber = dbIndex
dbRecord!DocumentTitle = "PlaceHolder"
dbRecord!DocumentRelativePath = PathName
dbRecord!DocumentFilename = FileName
dbRecord!DocumentNeeded = True
dbRecord!SearchKeywords = Null
dbRecord!RelatedDocumentNumbers = Null
dbRecord!DateDocumentLastEdited = Date
dbRecord.Update
I am looking to do the same thing with VB.Net, but so far it has eluded me, and all the examples I can find focus on USING the database. I just need to write to it, never read the data (except by opening Access).
Any help would be appreciated.