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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SyntaxFormSql

Status
Not open for further replies.
Jul 23, 2018
4
TW
I'm trying to build a grid datawindow using SyntaxFormSql. The user is not sa. I cannot get the correct syntax. How can i do ?
 
Matt,

I using SyntaxFromSQL by not sa user. The column text is different from pbcatcol.pbc_hdr.

Thanks.
 
Matt,

When user is sa I got this.
"retrieve="select * from cust_stk_brand"
[highlight #FCE94F]update="cust_stk_brand" updatewhere=1)
[/highlight]header(height=92)
detail(height=104)
column(band=detail id=1 x="14" y="8" height="76" width="293" tabsequence=10 edit.limit=10 alignment="0" tag="[highlight #FCE94F]客戶代號[/highlight]"font.face="Arial" font.height="-12" font.weight="400" font.charset="0" font.pitch="2" font.family="2" font.underline="0" font.italic="0" font.strikethrough="0" border="0" color="0" background.mode="1" background.color="536870912" background.brushmode="0" background.gradient.color="8421504" background.gradient.scale="100" background.gradient.spread="100" background.gradient.repetition.mode="0" background.gradient.repetition.count="0" background.gradient.repetition.length="100" tooltip.enabled="0" tooltip.icon="0" tooltip.backcolor="134217752" tooltip.textcolor="134217751" tooltip.delay.initial="0" tooltip.delay.visible="32000" tooltip.isbubble="0" )"


When user is not sa I got this,and I can't update data.
"retrieve="select * from cust_stk_brand")
header(height=68)
detail(height=80)
column(band=detail id=1 x="14" y="8" height="64" width="251" edit.limit=10 alignment="0" font.face="Tahoma" font.height="-8" font.weight="400" font.charset="0" font.pitch="2" font.family="2" font.underline="0" font.italic="0" font.strikethrough="0" border="0" color="0" background.mode="1" background.color="536870912" background.brushmode="0" background.gradient.color="8421504" background.gradient.scale="100" background.gradient.spread="100" background.gradient.repetition.mode="0" background.gradient.repetition.count="0" background.gradient.repetition.length="100" tooltip.enabled="0" tooltip.icon="0" tooltip.backcolor="134217752" tooltip.textcolor="134217751" tooltip.delay.initial="0" tooltip.delay.visible="32000" tooltip.isbubble="0" edit.autoselect=yes edit.autohscroll=yes edit.autovscroll=no edit.focusrectangle=no )"


I need to update data and user is not sa. How can I do?


Many thanks!


 
I am confused. How are you building the SQL statement you send to the SyntaxFromSQL method? Also, what is the presentation string?

Matt

"Nature forges everything on the anvil of time"
 
Matt,

My syntax like this.

"sql_syntax = 'select * from ' + this.object.pbt_tnam[currentrow]
ls_type = 'grid'
presentation_str = "style(type=" + ls_type + ")"
dwsyntax_str = SQLCA.SyntaxFromSQL(sql_syntax,presentation_str, ERRORS)
"

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top