ibm-midrange

iDB2Commands in Visual Studio 2010

大城市里の小女人 提交于 2019-12-11 16:24:32
问题 These are the basic things I know about iDB2Commands to be used in Visual Studio 2010. Could you please help me how could I extract data from DB2? I know INSERT, DELETE and Record Count. But SELECT or Extract Data and UPDATE I don't know. Imports IBM.Data.DB2 Imports IBM.Data.DB2.iSeries Public conn As New iDB2Connection Public str As String = "Datasource=10.0.1.11;UserID=edith;password=edith;DefaultCollection=impexplib" Dim cmdUpdate As New iDB2Command Dim sqlUpdate As String conn = New

Db2 connection problem with IBM DB2

两盒软妹~` 提交于 2019-12-11 15:06:25
问题 I am trying to connect a db2 database using php. Now, i am gonna write some code similar to this(call a stored procedure): $proc = 'CALL MyLib.MySP(?, ?, ?)'; $stmt = db2_prepare($conn, $proc) or die("db2_prepare failed<br>"); // Define input variable values // $paramIN1 = ...; $paramIN2 = ...; $paramOUT3 = ""; // Define parameters // db2_bind_param($stmt, 1, "paramIN1", DB2_PARAM_IN); db2_bind_param($stmt, 2, "paramIN2", DB2_PARAM_IN); db2_bind_param($stmt, 3, "paramOUT3", DB2_PARAM_OUT); //

SQL injection - no danger on stored procedure call (on iSeries)?

自作多情 提交于 2019-12-11 15:03:26
问题 I've done some searching around but I have a specific question on SQL Injection and hope I can get some input as I believe I may be getting the wrong end of the stick to do with field data sanitising etc :- I have a java program calling a stored procedure on an iSeries. The stored procedure has CL / RPG code behind the scenes. The stored procedure is called by way of parameters with the data coming from a web page. For example the call would look like the following:- call library.prog(

IBM i what use is PASE

回眸只為那壹抹淺笑 提交于 2019-12-11 14:52:54
问题 What use is PASE to me as an RPGLE and Java coder. If I am a Java coder what use is PASE to me on IBMi. Any example practical things that you have done in your professional life would help? So if I was a node developer would I install in the PASE container, and call rpgle to do DB2 access, I know you could use SQL directly from node? Regards, Jemrug 回答1: Here are my notes on PASE (from https://github.com/MandyShaw/iPerimeter/blob/master/IBMi/CallPASE/ILEtoPASEProofOfConcept.pptx) Portable

ROR import csv file no method error

ⅰ亾dé卋堺 提交于 2019-12-11 11:32:42
问题 the error: NoMethodError (undefined method `read' for nil:NilClass): app/controllers/imports_controller.rb:5:in `upload' I reworked my csv upload routine from my earlier question Adding CSV Import to a ROR application I had found a question that was asked several years ago that seemed similar to what I wanted but some of the code was in Spanish Ruby on Rails - Import CSV file imports_controller: class ImportsController < ApplicationController def upload logger.info "File loaded" infile =

Hebrew text data from AS400 shown backwards When downloading data using SSIS

扶醉桌前 提交于 2019-12-11 11:29:55
问题 I have SSIS package that downloading data from table in AS400 server to table in MSSQL, I'm using IBM AS/400 Client Access Express driver to access the as400, but data that contains Hebrew text just gets downloaded backwardly for example 'דוגמה' ----> 'המגוד' I'm sure it's something wrong with configuration. 回答1: I've seen this issue before when I was working in Israel. I'm not 100% sure anymore what i did to resolve this, but make sure the default codepage of the package is hebrew 来源: https:

Get decimals from Recordset in VBA with ADODB

你。 提交于 2019-12-11 10:41:37
问题 I'm trying to get a value from a field, I don't know why is rounded rs.Open myQuery, cnn i = 1 Do While rs.EOF = False S1 = rs.Fields("S1") Cells(i, 1) = S1 i = i + 1 rs.Next Loop For example, in the database S1 is 8.567 but I always get 8 Is there a way to define the data type from that field? Thank you! 回答1: Declare and assign your variables properly. dim S1 as double '<~~declare a double-type variable rs.Open myQuery, cnn i = 1 With Worksheet("Sheet1") 'define the parent worksheet Do While

Creating views in as400 db2

纵然是瞬间 提交于 2019-12-11 10:15:16
问题 If I create a view in db2, say something like: select RNN(sometable) as rn, c1,c2,c3 from sometable order by rn desc fetch first 100 rows only This would essentially pull the last 100 rows from the table (I use RNN because there's nothing else to base that sort by, sadly. Not by my design). My questions on this are: Does this view automatically get updated as sometable gets updated Does this view, more specifically, remove non-matching rows. For instance, lets say it pulls the last 100 rows

How to prevent user from entering special characters (like symbols not visible in keyboard) in a text field (Character type)?

风格不统一 提交于 2019-12-11 09:04:44
问题 How to prevent user from entering special characters (like symbols not visible in keyboard) in a text field (Character type) in AS400 ?? Visibly most of the time there is no issue for iseries/as400 in accepting it and saving it into the file but sometimes when the data is handled in downstream reporting system it get rejected with different error in their system. Is there a way to prevent from the entry point itself ? eg: In Address field of a Customer, end user copy paste (ctrl + c ctrl + v

Not able to create Materialized query on AS400

前提是你 提交于 2019-12-11 08:55:35
问题 I get an error message when trying to create materialized query in as400 I use winSql for the connection. The syntax seems valid. Could you please point out what am I doing wrong? This is the statement I am trying to execute CREATE TABLE AAA.TEST_MQ AS ( SELECT test.* FROM AAA.TABLE_NAME test ) REFRESH DEFERRED This is the error message: Error: SQL0104 - Token <END-OF-STATEMENT> was not valid. Valid tokens: IMMEDIATE <IDENTIFIER>. (State:37000, Native Code: FFFFFF98) I Tried creating an