BUT - I am getting an 'INTERFACE OUT OF SEQUENCE' error. What is the correct syntax for inserting values into a table?
Many thanks!This message has been edited. Last edited by: Kerry,
Prod: Service Manager 5.5 - DataMigrator 7.6 - Win2K Test: Service Manager 5.5 - DataMigrator 7.6 - Win2K Local: DevStudio 5.5.3 - Management Console - Windows XP SP2
January 19, 2007, 03:00 AM
Tony A
Darren,
When using SQL passthru you need to process the SQL by getting WF to use it. Think of the passthru as the setting up of a temporary view. The view is there but you don't get the data unless you execute it.
Try this -
-*-- Set up the SQL Environment ----------------------------
SET SQLENGINE = SQLMSS
SQL SET SERVER MYSERVER
-RUN
-*-- Insert row ----------
SQL
INSERT INTO MYDB.dbo.MYTABLE (FIELD1, FIELD2) VALUES('1','2')
;
TABLE FILE SQLOUT
PRINT *
END
-RUN
Good luck
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
January 19, 2007, 03:26 AM
DarrenH
Thanks Tony. I guess it's just getting my head around it conceptually now
That *seems* to work in that it doesn't return any errors, but it doesn't actually populate my table. I have double-checked my synonym definition for the destination and it's all okay. When I run the code I get a return of "(FOC1364) ROWS AFFECTED BY PASSTHRU COMMAND: 1/INSERT" which I guess means this should have worked?
Prod: Service Manager 5.5 - DataMigrator 7.6 - Win2K Test: Service Manager 5.5 - DataMigrator 7.6 - Win2K Local: DevStudio 5.5.3 - Management Console - Windows XP SP2
January 19, 2007, 03:57 AM
hammo1j
Darren
Yes that's wf reporting back its done its stuff.
Regarding the syntax of the INSERT in wf - you dont need the table since no answerset is returned unlike a select.
However the semi colon and END are essential...
SQL INSERT INTO MYDB.dbo.MYTABLE (FIELD1, FIELD2) VALUES('1','2') ; END
John
Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2 Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
January 19, 2007, 04:09 AM
DarrenH
Excellent! You guys have made my Friday a whole lot easier.
All working now - thanks!
Prod: Service Manager 5.5 - DataMigrator 7.6 - Win2K Test: Service Manager 5.5 - DataMigrator 7.6 - Win2K Local: DevStudio 5.5.3 - Management Console - Windows XP SP2
January 19, 2007, 08:05 AM
<DocServices>
Hi Darren,
If you have an InfoResponse ID, log on to the Tech Support Web site and then access i-Base. By logging in first, you can download the FOCUS manuals in PDF format and/or view the HTMLHelp version.
You can access i-Base via the following Web sites:
And I get the following error message: : Microsoft OLE DB Provider for SQL Server: [42000] The name "Sep" is not: permitted in this context. Valid expressions are constants, constant exp: ressions, and (in some contexts) variables. Column names are not permitt: ed.
Why would it think Sep is a column name?
7.7.02 Windows EXCEL, PDF, CSV, TEXT
September 15, 2010, 02:01 PM
Francis Mariani
You must place text values within single quotes, just like any SQL INSERT statement.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server