Hello All.
I'm making some progress, but still running into stumbling blocks..
This aftervalidate code, taken from the help file and modified to work in web app, is simply supposed to take the value of the control in a dialog, and use it as an argument to filter a SQL Server SELECT statement.
I am getting a "no argument defined" type of error. If I substitute a value ('mo35000' for example) for the ar1 argument, the code seems to work and session.result is usable on the redirected page.
The way I am attempting to define the argument is taken from the script created by the "execute insert using alpha DAO" genie. It works in another component.....
Any suggestions on getting this argument to work?
Thanks
Erik
PS. I got an email from Alpha today touting the updated books, but the outlines have no mention of using Alpha DAO. The help file seems to be totally out of date and sparsely filled with info about these SQL functions. Are they working on getting this stuff updated??
I'm making some progress, but still running into stumbling blocks..
This aftervalidate code, taken from the help file and modified to work in web app, is simply supposed to take the value of the control in a dialog, and use it as an argument to filter a SQL Server SELECT statement.
I am getting a "no argument defined" type of error. If I substitute a value ('mo35000' for example) for the ar1 argument, the code seems to work and session.result is usable on the redirected page.
The way I am attempting to define the argument is taken from the script created by the "execute insert using alpha DAO" genie. It works in another component.....
Any suggestions on getting this argument to work?
Thanks
Erik
PS. I got an email from Alpha today touting the updated books, but the outlines have no mention of using Alpha DAO. The help file seems to be totally out of date and sparsely filled with info about these SQL functions. Are they working on getting this stuff updated??
Code:
delete session.result dim conn as SQL::Connection dim rs as SQL::ResultSet dim connString as C dim select_exp as C dim tem as c tem = currentform.Controls.MO_TO_FIND DIM args as sql::arguments args.add("ar1",tem) conn.PortableSQLEnabled = .t. connString = "::Name::MAXXVMFG" select_exp = "SELECT [WORK_ORDER].[BASE_ID],[WORK_ORDER].[PART_ID],[WORK_ORDER].[DESIRED_QTY],[WORK_ORDER].[DRAWING_REV_NO],PART.DESCRIPTION,PART.[USER_1] FROM [WORK_ORDER] [WORK_ORDER] LEFT OUTER JOIN PART PART ON ([WORK_ORDER].[PART_ID] = PART.ID)WHERE ((([WORK_ORDER].[BASE_ID] = :ar1 ) AND ([WORK_ORDER].[SUB_ID] = '0'))AND ([WORK_ORDER].TYPE = 'W'))" if .not. conn.open(connString) end if if .not. conn.execute(select_exp) end end if rs = conn.ResultSet session.result = rs.tostring() conn.close() session.err = "OK" CurrentForm.redirectTarget="test.a5w"