 |
|
 |
Can you direct me to any exception handling (recommended practices) when it comes to trapping as400 errors?
|
|
|
|
 |
|
 |
Hi,
I am using asp.net application installed on Unix under APache/Mono server.
I am using a functionality to enter name of FRENCH person and store it in databse.
e.g. Sebastián Pani - okk.
But while seeing the logs and databse values after stroring , I can see it as Sebasti?!n Pani.
Means the french chars are being missed out. The same is working fine on IIS, but not on MONO.
I also checked the settings in web.config, and also fr_FR.utf8 fonts are present in locale.
So am I missing out something to set ??
Please reply.
- Ajay K
|
|
|
|
 |
|
 |
we migrating IIS 5.0 to IIS 6.0
From dot net we connect mainframe using ODBC. I am getting error after migration
"Mainframe check Error: Catastrophic failure"
Can any one help me on this?
Thank You
Ilan
|
|
|
|
 |
|
 |
Hello,
I've installed mono, and xsp (not yet mod_mono) on ubuntu following the instruction here:
http://ubuntuforums.org/showthread.php?t=803743
in view of using mod_mono together with php on ubuntu server 8.04, to migrate a web service that access a db2/as400 database.
I've also installed db2exc from ubuntu repository as said here:
http://www.ubuntu.com/partners/ibm/db2
I can compile a test program that does a query to the db:
using System;
using System.Data;
using IBM.Data.DB2;
public class HelloWorldDb2{
public static int Main( string[] args ){
if( args.Length != 1 ){
System.Console.Error.WriteLine( "You must tell me your name!" );
}else{
string name= args[0];
System.Console.WriteLine( "Hello, {0}", name );
DB2Connection conn = null;
conn = new DB2Connection("Database=VIAGGIFAM;UserID=S_IA;Password=A__N;Server=192.168.0.200");
conn.Open();
DB2Command cmd = conn.CreateCommand();
cmd.CommandText="SELECT * FROM VIAGGIFAM.PWKCXM";
DB2DataReader reader = cmd.ExecuteReader();
Console.WriteLine("\nExecuted:"+cmd.CommandText);
int cols = reader.FieldCount;
bool rows = reader.HasRows;
Console.WriteLine("\nCols:"+cols+", rows:"+rows);
int r=1;
while( reader.Read() == true ){
int i=0;
Console.WriteLine(""+r++);
for( i=1; i<= cols; i++ ){
if( i>1 ){
Console.Write( ",");
}
Console.Write(reader.GetString(i));
}
}
}
return 0;
}
}
siap@LxPC54 /src/test$ gmcs -r:/usr/lib/mono/1.0/IBM.Data.DB2.dll -r:/usr/lib/mono/2.0/System.Data.dll helloDB2.cs
but when I execute it:
siap@LxPC54 /src/test$ sudo MONO_LOG_LEVEL=debug mono helloDB2.exe bart
....
Mono-INFO: Assembly Ref addref System.Data 0x8362e10 -> System.Xml 0x83719d8: 2
Hello, bart
Mono-INFO: DllImport attempting to load: 'libdb2'.
Mono-INFO: DllImport loading location: 'libdb2.so'.
Mono-INFO: Searching for 'SQLAllocHandle'.
Mono-INFO: Probing 'SQLAllocHandle'.
Mono-INFO: Found as 'SQLAllocHandle'.
Mono-INFO: DllImport attempting to load: 'libdb2'.
Mono-INFO: DllImport loading location: 'libdb2.so'.
Mono-INFO: Searching for 'SQLAllocHandle'.
Mono-INFO: Probing 'SQLAllocHandle'.
Mono-INFO: Found as 'SQLAllocHandle'.
Bart
not useLibCli
Bart
not useLibCli
Mono-INFO: DllImport attempting to load: 'libdb2'.
Mono-INFO: DllImport loading location: 'libdb2.so'.
Mono-INFO: Searching for 'SQLDriverConnectW'.
Mono-INFO: Probing 'SQLDriverConnectWW'.
Mono-INFO: Probing 'SQLDriverConnectWW'.
Mono-INFO: Probing 'SQLDriverConnectW'.
Mono-INFO: Found as 'SQLDriverConnectW'.
Mono-INFO: DllImport attempting to load: 'libdb2'.
Mono-INFO: DllImport loading location: 'libdb2.so'.
Mono-INFO: Searching for 'SQLDriverConnectW'.
Mono-INFO: Probing 'SQLDriverConnectWW'.
Mono-INFO: Probing 'SQLDriverConnectWW'.
Mono-INFO: Probing 'SQLDriverConnectW'.
Mono-INFO: Found as 'SQLDriverConnectW'.
Mono-INFO: DllImport attempting to load: 'libdb2'.
Mono-INFO: DllImport loading location: 'libdb2.so'.
Mono-INFO: Searching for 'SQLGetInfoW'.
Mono-INFO: Probing 'SQLGetInfoWW'.
Mono-INFO: Probing 'SQLGetInfoWW'.
Mono-INFO: Probing 'SQLGetInfoW'.
Mono-INFO: Found as 'SQLGetInfoW'.
Mono-INFO: DllImport attempting to load: 'libdb2'.
Mono-INFO: DllImport loading location: 'libdb2.so'.
Mono-INFO: Searching for 'SQLGetInfoW'.
Mono-INFO: Probing 'SQLGetInfoWW'.
Mono-INFO: Probing 'SQLGetInfoWW'.
Mono-INFO: Probing 'SQLGetInfoW'.
Mono-INFO: Found as 'SQLGetInfoW'.
Mono-INFO: DllImport attempting to load: 'libdb2'.
Mono-INFO: DllImport loading location: 'libdb2.so'.
Mono-INFO: Searching for 'SQLGetDiagRec'.
Mono-INFO: Probing 'SQLGetDiagRec'.
Mono-INFO: Found as 'SQLGetDiagRec'.
Mono-INFO: DllImport attempting to load: 'libdb2'.
Mono-INFO: DllImport loading location: 'libdb2.so'.
Mono-INFO: Searching for 'SQLGetDiagRec'.
Mono-INFO: Probing 'SQLGetDiagRec'.
Mono-INFO: Found as 'SQLGetDiagRec'.
Bart
not useLibCli
Unhandled Exception: IBM.Data.DB2.DB2Exception: ERROR 08003 IBMCLI Driver CLI0106E Connection is closed. SQLSTATE=08003 InternalExecuteNonQuery: Unable to allocate statement handle.
at IBM.Data.DB2.DB2Command.AllocateStatement (System.String location) 0x00000
at IBM.Data.DB2.DB2Command.ExecuteNonQueryInternal (CommandBehavior behavior) 0x00000
at IBM.Data.DB2.DB2Command.ExecuteReader (CommandBehavior behavior) 0x00000
at IBM.Data.DB2.DB2Command.ExecuteReader () 0x00000
at (wrapper remoting-invoke-with-check) IBM.Data.DB2.DB2Command:ExecuteReader ()
at HelloWorldDb2.Main (System.String[] args) 0x00000
|
|
|
|
 |
|
 |
Hi
I am programing in VB.NET 2003 & have successfully connected to DB2 using against a single table using the following code:-
' Open a connection to the iSeries
Dim cn As iDB2Connection = New iDB2Connection ("DataSource=AS400;DefaultCollection=TEST;")
cn.Open()
' Create a command that selects records from the EMPLOYEE table
Dim cmd As iDB2Command = New iDB2Command("select * from Table1", cn)
' Create a DataSet to hold our data.
Dim ds As DataSet = New DataSet()
' Execute the command, and get a DataReader in return.
Dim dr As iDB2DataReader = cmd.ExecuteReader()
Using the same principle I am trying to create a dataset that contains data from three tables.
How do I go about doing this?
Nigel
|
|
|
|
 |
|
 |
Hi,
I am trying to connect to a DB2/MVS V5R1 dtabase from a sample .Net application. I am using MS Oledb provider for DB2 for connection.
The connection.open throws a network error -
Could not connect to data source 'testdb2':
An internal network library error has occurred. A network level syntax error has occurred. SQLSTATE: HY000, SQLCODE: -379
Connection String -
Provider=DB2OLEDB; DataSource=10.10.100.5; Persist Security Info=True ; Host CCSID=
20285 ; PC Code Page=1252 ; Network Transport Library=TCPIP ; Network Address=10.10.
100.5;Network Port=23;Initial Catalog=BOGA721; Package Collection=C066705;Default
Schema=C066705;User ID=C066705; Password=******;DBMS Platform=DB2/MVS
Am I doing anything wrong? Please advise
|
|
|
|
 |
|
 |
hi please send that how to resolve this
Server Error in '/phani' Application.
phani "where i saved my app in Inetpub\wwwroot\-
-------------------------------------------------------------------------------
The 'ibmdadb2' provider is not registered on the local machine.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The 'ibmdadb2' provider is not registered on the local machine.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidOperationException: The 'ibmdadb2' provider is not registered on the local machine.]
with best regards
|
|
|
|
 |
|
 |
Hi
I am trying to connect DB2 through .NET but i m getting following error
- "The 'IBMDADB2.1' provider is not registered on the local machine."
I have VS.NET 2003,How can i resolve this problem ???
Code--
Shared connectionString As String = "Provider=IBMDADB2.1;Server=xxx.xxx.xxx.xxx;Port=xxxx;User ID=myUserIDassword=myPWD;Data Source=Database name"
Regards
parvinder
|
|
|
|
 |
|
 |
When trying to connect to our AS400 using an OleDb connection I receive the following error:
Non-NULL controlling IUnknown was specified, and either the requested interface was not
IUnknown, or the provider does not support COM aggregation.
However, if I pop a message box, or show a form before opening the connection it all works. Just wondering if anyone has had similar experiences, and if so, how they got around having to use a GUI element to get it to work?
|
|
|
|
 |
|
 |
Anyone have experience with these? I have been trying to get it to work, but cannot create a connection in the IBM Data Explorer, it always gives me the error:
Test connection failed: 0: Error occured: [IBM][CLI Driver] CLI0124E
Invalid argument value. SQLSTATE=HY009: -99999: IBM.Data.DB2: HY009
Ive looked this up online, and cannot find anything useful. I have the server, and alias and usr/pwd all filled in with the correct info which i got from our AS400 guys.
Thanks in advance.
|
|
|
|
 |
|
 |
Same thing with me...
If anyone can help , please, post here the solution....
|
|
|
|
 |
|
 |
Hi:
Perhaps you can update in the article the connectionStrings that need to be used while using
IBM DB2 OLEDB Providers shipped with Db2 Administration Client.
With Microsoft ODBC .NET Provider, we can also use IBM DB2 ODBC Driver:
Provider=IBMDADB2;Database=TheDatabaseName;hostname=IpAddressOrDnsNameOfTheDatabaseServer;port=DbInstancePort; Protocol=TCPIP;uid=DbLogonCredentials;pwd=DbLogonCredentials;
DRIVER=IBM DB2 ODBC DRIVER;Database=TheDatabaseName;hostname=IpAddressOrDnsNameOfTheDatabaseServer;port=DbInstancePort; Protocol=TCPIP;uid=DbLogonCredentials;pwd=DbLogonCredentials;
Observe the space between port; and Protocol. I inserted this space otherwise, CodeProject Comments Editor is inserting a smiley because of key combinations.
Except for the Provider or Driver clause, everything else remains the same.
Hope this helps...
Deepak Kumar Vasudevan
Personal Web: http://deepak.portland.co.uk/
I Blog At: http://deepak.blogdrive.com/
|
|
|
|
 |
|
 |
I am still unable to connect to the IBM DB2 database using this connection string.
The connection string is:
Provider=IBMDADB2;Network Address=IP Address of Server:Port Number;Default Schema=Database Name;User ID=myUID;Password=myPWD;"
I got error as:
SQL1013N The database alias name or database name "" could not be found. SQLSTATE=42705
Can any one Pls help me resolve the issue.
|
|
|
|
 |
|
 |
Finally I got it working fine by using :
using System.Data.OleDb;
using System.Data.Common;
And connection string as:
Provider=IBMDADB2.1;PROTOCOL=TCPIP;Network Address=xxx.xxx.xxx.xxx;PORT=xxxxx;Default Schema=myDBSchema;User ID=myUserID;Password=myPWD;Data Source=Datbase Name;Persist Security Info=False
U can use this and get urself going..
|
|
|
|
 |
|
 |
Hi
I am trying to connect DB2 through .NET but i m getting following error
- "The 'IBMDADB2.1' provider is not registered on the local machine."
I have VS.NET 2003,How can i resolve this problem ???
Code--
Shared connectionString As String = "Provider=IBMDADB2.1;Server=xxx.xxx.xxx.xxx;Port=xxxx;User ID=myUserID;Password=myPWD;Data Source=Database name"
Regards
parvinder
|
|
|
|
 |
|
 |
Hi
I am trying to connect DB2 through .NET but i m getting following error
- "The 'IBMDADB2.1' provider is not registered on the local machine."
I have VS.NET 2003,How can i resolve this problem ???
Code--
Shared connectionString As String = "Provider=IBMDADB2.1;Server=xxx.xxx.xxx.xxxort=xxxx;User ID=myUserIDassword=myPWD;Data Source=Database name"
Regards
parvinder
|
|
|
|
 |
|
 |
As a mostly reformed AS/400 programmer recently converted to .net I was pleased to see that an article like this even existed! The as/400 or i-series version of DB2 is ALWAYS behind the development curve even though there are lots of shops using it. HIT Software also has an excellent native DB2 provider for AS/400 and other Db2 platforms. Their version also integrates nicely into Visual Studio 2003 and the .net 1.1 sdk. It is very expensive however. IBM has been promising a native DB2 provider for the iseries but is very very slow to market . Too bad .NET is so easy to develop and now if I could just get to that AS/400 data with it. I will try the ole db connection as shown maybe it isn't that slow...
the IBM DB2 data provider mentioned here ONLY works with Visual Studio 2002 and not the 1.1 .net ! But it does integrate well in that older version of VS and the .net framework.
|
|
|
|
 |
|
 |
I met the guys who developed IBM's DB2 provider for .NET, they gave a presentation at an internal expo here at IBM Rochester (I'm here for the summer as a co-op). I was fairly impressed, and somewhat surprised that there was any C#/.NET development going on at IBM. This would've been an interesting project to work on, and could've really helped hone my ADO.NET skills; too bad I was stuck doing Java programming instead!
Keith Platfoot
Alpine Software
www.alpinecustomsoftware.com
|
|
|
|
 |
|
 |
So, are you one of the developers that created the latest JAVA DB2 tools provided by IBM?
I hope not because they suck even more than the previous releases, without JAVA.
Sorry, just some frustration coming out, nothing personal...
Thanks for the article,
regards,
Peter.
|
|
|
|
 |
|
 |
Nope, no responsibility here. I've been working on a platform for autonomic software agents, written in Java. I can definitely understand where you're coming from, though, I know they're converting some server software from C++ to Java, and I've had doubts whether this is a smart move, especially because of the sluggishness of a Swing interface. I keep hearing Java's faster than it used to be, but most of the Java apps I have to use here at work still seem pretty slow. The exception is Eclipse, which I've heard uses some sort of customized AWT, not Swing. But it still takes forever to start up, even on my 2.4 GHz machine.
Keith Platfoot
Alpine Software
www.alpinecustomsoftware.com
|
|
|
|
 |
|
 |
I saw this and have to comment.
I've also used the IBM DB2 "development" tools working on a project using DB2 from .NET. The tools are the worst pieces of commercial software I've ever used, honestly with no exaggeration. That 'development center' is so buggy I don't think they did any testing (ANY TESTING!). The user-interface isn't intuitive either and unless they have some super-secret shortcut keys for entering data that I don't know about, you can't easily enter test parameters for your stored procedure. I want to type, tab, type, tab, type, tab, enter. And they want you to click, type, oops dont have focus, double-click, type, tab, type (oops no focus), double-click, type, tab, now this decimal field that used to be 0 has -49 in it mysteriously, overwrite that with 0, click on another item, click back, its -49 again, hmmm. Jesuz Chrizt!
And performance.... don't get me started. This thing is dog slow to launch and use. I could probably type in some code, build and run it to test a stored procedure before I can launch it, get to the stored procedure, and test.
Thanks for listening to my rant. I'd love to curse but trying to keep this clean.
|
|
|
|
 |
 | Links  |  | Anonymous | 11:20 31 Aug '03 |
|
 |
Links where the mentioned providers can be downloaded from would have been very useful. IMO this article does not have much value without this information. The only problem is where to find the the db providers; once you have the binary it's real easy to figure out how to use it.
|
|
|
|
 |
|
 |
Sorry..I forgot to add links....Now it is available...
Sreejumon
|
|
|
|
 |
|
 |
The link to the IBM DB2 Provider is not working,where can i find it?
|
|
|
|
 |
|
|
 |