ds_ABC is a datastore that I've created. I also tried with Datastore instead.
And I tried using SetTransObject(SQLCA) for both. It still gives -1 for insertRow()
Main Topics
Browse All TopicsHi, I'm trying to store some data in a datastore object. My code is given below.
The problem is that insertRow(0) is always returning -1 and so, I'm not able to insert any data.
What am I doing wrong here?
Based on a suggestion I got from here, I tried using "lds_abc.SetTransObject(SQ
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Thanks, Shru_0409. I'll check it out. Meanwhile, I used another code that I got from this site to get data into the datastore from an Excel file. My code is given below:
This seems to work.
But as you can see, I've hard coded the lastcell value with the column letter 'H'.(The excel file that I used for testing had 'H', i.e, 8 columns.) Is there any way to get this column letter using some function?
Back to your original question - on why insertRow(0) is returning -1, Only reason I could think of is that the datastore you are assigning is not valid/has errors.
Please make sure that datawindow 'dw_AC_DB' exists in your library list and you can open it in datawindow painter. Any spelling errors ?
lds_ABC.DataObject = 'dw_AC_DB'
Insertrow() shouldn't be needing SetTransobject()
Business Accounts
Answer for Membership
by: shru_0409Posted on 2009-08-13 at 04:43:53ID: 25087093
what is ds_Abc? if not than code should be
CA)"
] = ls_read
long ll_row
DataStore lds_ABC
lds_ABC= create DataStore
lds_ABC.DataObject = 'dw_AC_DB'
lds_abc.SetTransObject(SQL
ll_Row = lds_ABC.InsertRow(0)
if ll_Row <> -1 then
lds_ABC.object.code[ll_row
end if