Requirements: IBM DB2 ODBC Driver
Function DB2Connect ()
DB2ConnStr = "Provider=IBMDADB2.1; Database=HSAPSETS; Hostname=DB2Host; Schema=Schema;Protocol=TCPIP; Port=50004; Uid=Db2user; Pwd=Db2Pass"
Set DB2Cn = CreateObject("ADODB.Connection") 'Create Object ADODB Connection
With DB2Cn
.CursorLocation = 3 : .ConnectionString = DB2ConnStr : .Open
End with
End Function
Saturday, April 12, 2008
Subscribe to:
Post Comments (Atom)
5 comments:
Hey sunil,
thank u the code was relly helpful..
Thank for visiting my blog.
-Sunil
Hi Sunil,
Just what i was looking for, thanks for the code snippet !
Hi Sunil,
When i try executing ur code, i get error "Provider cannot be found, It may not be properly installed"
I have also installed ODBC driver.
Please let me know the workaround
Hi Sunil,
Thanks for your code!
Actually, I really know the answer for my question below. But still wanted to get confirmed from an expert on this.
Can we establish DB2 connection without IBM DB2 ODBC DRIVER? Is it really possible?
I know it's not possible, however asked to get confirmation. Thanks!
~~ Gopi
Post a Comment