By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,632 Members | 1,499 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,632 IT Pros & Developers. It's quick & easy.

adding new row to a DB

P: 42
Basically what this command button does is it splits a record with 2 words and assigns the 1st word to the original cell and adds a new row but assigns the second word to the new row, but it doesnt work

Set MyConn = New ADODB.Connection
MyConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Thesis\testing\gary\test1.mdb;"
MyConn.Open
Set MyRecSet = New ADODB.Recordset
MyRecSet.CursorLocation = adUseClient
MyRecSet.Open "SELECT * FROM Table2 ORDER BY tag", MyConn.ConnectionString, adOpenKeyset, adLockPessimistic
Do Until MyRecSet.EOF
ToBeSplit = MyRecSet.Fields(1).Value

wordset = Split(ToBeSplit, ";")
If UBound(wordset) > 0 Then

For ctr2 = 1 To UBound(wordset)
'THIS IS THE PART I DONT KNOW WHAT TO DO:
ADDNEW ROW
copy myrecset(0) to the myrecset(0) of new row
assign to myrecset(1) the value of wordset(ctr2)
Next ctr2

MyRecSet.MoveNext

End If

Loop
MyConn.Close
Nov 29 '06 #1
Share this Question
Share on Google+
2 Replies


P: 42
nevermind i did it already.. hehe but pls look at the previous post i did regarding filelist and dirlist... THANKS
Nov 29 '06 #2

sashi
Expert 100+
P: 1,754
nevermind i did it already.. hehe but pls look at the previous post i did regarding filelist and dirlist... THANKS
Hi there,

Good luck on your experiment. Take care.
Nov 29 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.