Hello. Please allow, although English is weak.
OS:Windows2000 Pro(SP2)
VB:6.0 Pro(SP5)
DB2:IBM DB2 UDB Enterprise Edition V7.2 for Linux
I installed the following in the Windows machine.
DB2 application development client
Then, since the ODBC driver "IBM DB2 ODBC DRIVER" was also installed together,
DSN was able to be created using the driver,
and it could connect by the following method,
and the record set was able to be created and displayed.
-----------------------------------------
ConString = "Provider=MSDASQL;" _
& "DSN=DB2TEST;" _
& "User ID=USERID;" _
& "Password=PASSWORD;"
Set cn = New ADODB.Connection
cn.ConnectionString = ConString
cn.Open
-----------------------------------------
Then, I wanted to connect without using DSN,
and the portion of ConString tended to be changed
and it was going to connect as follows.
-----------------------------------------
ConString = "Provider=IBMDADB2;" _
& "DRIVER=IBM DB2 ODBC DRIVER;" _
& "UID=USERID;" _
& "PWD=PASSWORD;" _
& "PROTOCOL=TCPIP;" _
& "HOSTNAME=XXX.XXX.XXX.XXX;" _
& "DATABASE=SAMPLEDATABASE;" _
& "SERVICENAME=50002"
Set cn = New ADODB.Connection
cn.ConnectionString = ConString
cn.Open
-----------------------------------------
Although it was connectable once, there are about two problems at present.
1) The display of Multi bytes Strings (Japaneese) contained in the
table of DB2 cannot be performed (character transformation).
2) They are "select salary / 1000 as AAA from staff" at the SELECT phrase of an SQL sentence. If it division is put in, SQL does not pass. (Addition, subtraction, and multiplication are OK)
If the parameter of ConString is not specified,
although I think that I am bad, since it does not know
how I should just specify, please help.
Thank you for your consideration.
# If DSN is used, the above-mentioned problem will not come out.
# Since I do not want to distribute simultaneous
# in addition to the application of VisualBasic.
# I want to make it solve in a program as much as possible.
OS:Windows2000 Pro(SP2)
VB:6.0 Pro(SP5)
DB2:IBM DB2 UDB Enterprise Edition V7.2 for Linux
I installed the following in the Windows machine.
DB2 application development client
Then, since the ODBC driver "IBM DB2 ODBC DRIVER" was also installed together,
DSN was able to be created using the driver,
and it could connect by the following method,
and the record set was able to be created and displayed.
-----------------------------------------
ConString = "Provider=MSDASQL;" _
& "DSN=DB2TEST;" _
& "User ID=USERID;" _
& "Password=PASSWORD;"
Set cn = New ADODB.Connection
cn.ConnectionString = ConString
cn.Open
-----------------------------------------
Then, I wanted to connect without using DSN,
and the portion of ConString tended to be changed
and it was going to connect as follows.
-----------------------------------------
ConString = "Provider=IBMDADB2;" _
& "DRIVER=IBM DB2 ODBC DRIVER;" _
& "UID=USERID;" _
& "PWD=PASSWORD;" _
& "PROTOCOL=TCPIP;" _
& "HOSTNAME=XXX.XXX.XXX.XXX;" _
& "DATABASE=SAMPLEDATABASE;" _
& "SERVICENAME=50002"
Set cn = New ADODB.Connection
cn.ConnectionString = ConString
cn.Open
-----------------------------------------
Although it was connectable once, there are about two problems at present.
1) The display of Multi bytes Strings (Japaneese) contained in the
table of DB2 cannot be performed (character transformation).
2) They are "select salary / 1000 as AAA from staff" at the SELECT phrase of an SQL sentence. If it division is put in, SQL does not pass. (Addition, subtraction, and multiplication are OK)
If the parameter of ConString is not specified,
although I think that I am bad, since it does not know
how I should just specify, please help.
Thank you for your consideration.
# If DSN is used, the above-mentioned problem will not come out.
# Since I do not want to distribute simultaneous
# in addition to the application of VisualBasic.
# I want to make it solve in a program as much as possible.