Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SyntaxFromSql() & dwc.Create() Does not Seem to be working

Status
Not open for further replies.

kaul125

Programmer
Jan 29, 2002
87
0
0
US
I'm dynamically building a sql statement using PB6.5 by using SQLCA.SyntaxFromSQL(ls_sql,"",ls_errors) statement. I then issue the dwc.Create(ls_dwsyntax, ls_errors)

Everything works fine at this point. It creates the sql fine and after I issue the settransobject and dwc.retrieve() functions, it retreives the rows.

However, after it retrieves the rows, I want to then change some of the values for one of the columns in the dw. I issue the dwc.setitem() function and then the dwc.accepttext(), dwc.update() funtions. I get no errors at this point.

I then do dwc.saveas() to save the dw to a text file. When I open the file, the column I did the setitem on is not updated with the new values.

Why would the update not work? How come the column values in the setitem() function do not update?

Keith
 
Do you want your changes to be sent back to the db? If so, right now they aren't because your dw is not updatable. If you want it to be, you will have to use the modify dw function to set several dw properties such as datawindow.table.updatetable (you should be able to find info for this stuff through online searches and/or pb help.) Anyway, if you don't want to send changes back to the db, you should just be able to take out the update() command. Let me know if any of this helps.

Dan

PS. You don't need the accepttext command unless the user is entering data into the dw.
 
It's difficult to see your problem...

did u review your data types ?
you cannot set a string in a numeric...

and try to put your dw in the screen to see the values...

if u can send your source maybe i could help u.

regards
 
I have to apologize for this issue. I was not looking closely at my datatypes. I made an assumption that my datatype was of type string and instead it was of type integer.

Everything is working fine now. Thanks your input!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top