473,503 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP .NET & DB2

I need to connect to my DB2 Server 8.1.3 through ASP .NET pages.

Is there a method to connect to DB2 directly from ASP .NET code without
having to program it with C# or VB .NET?

I need to validate a Username & Password (from an aspx form) with the DB2
Database table Users.
Nov 18 '05 #1
5 1653
Hi Antoni,

hope these thread help you:
http://www.dotnet247.com/247referenc.../10/53978.aspx
http://groups.google.co.in/groups?hl...threadm=OJOh62
puBHA.2564%40tkmsftngp04&rnum=1&prev=/groups%3Fq%3Dasp.net%2Band%2Bdb2%26hl%
3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3DOJOh62puBHA.2564%2540tkmsftn
gp04%26rnum%3D1

http://www.mstechzone.com/Articles/HTML/DB2_Net.htm
http://www.sqlsummit.com/DataProv.htm

--
Cheers!
Rajiv. R
Rajspace.Org

"Antoni Massó Mola" <am****@triliumsoftware.com> wrote in message
news:#U*************@TK2MSFTNGP12.phx.gbl...
I need to connect to my DB2 Server 8.1.3 through ASP .NET pages.

Is there a method to connect to DB2 directly from ASP .NET code without
having to program it with C# or VB .NET?

I need to validate a Username & Password (from an aspx form) with the DB2
Database table Users.

Nov 18 '05 #2
Hi Rajiv,

I've tried to use the IBM OLE DB Provider for DB2. When I compile the C#
code it doesn't give me any error, but the ASP .NET page does:
Server Error in '/DeptEmployees' Application.
----------------------------------------------------------------------------
----

SQL30082N Attempt to establish connection failed with security reason "17"
("UNSUPPORTED FUNCTION"). SQLSTATE=08001
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.Data.OleDb.OleDbException: SQL30082N Attempt to
establish connection failed with security reason "17" ("UNSUPPORTED
FUNCTION"). SQLSTATE=08001

Line 41: db2DataAdapter2.Fill(db2DataSet11);

Any idea what this error might be?
"Rajiv R" <ra********************@yahoo.com> wrote in message
news:OX**************@tk2msftngp13.phx.gbl...
Hi Antoni,

hope these thread help you:
http://www.dotnet247.com/247referenc.../10/53978.aspx
http://groups.google.co.in/groups?hl...threadm=OJOh62 puBHA.2564%40tkmsftngp04&rnum=1&prev=/groups%3Fq%3Dasp.net%2Band%2Bdb2%26hl% 3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3DOJOh62puBHA.2564%2540tkmsftn gp04%26rnum%3D1

http://www.mstechzone.com/Articles/HTML/DB2_Net.htm
http://www.sqlsummit.com/DataProv.htm

--
Cheers!
Rajiv. R
Rajspace.Org

"Antoni Massó Mola" <am****@triliumsoftware.com> wrote in message
news:#U*************@TK2MSFTNGP12.phx.gbl...
I need to connect to my DB2 Server 8.1.3 through ASP .NET pages.

Is there a method to connect to DB2 directly from ASP .NET code without
having to program it with C# or VB .NET?

I need to validate a Username & Password (from an aspx form) with the DB2 Database table Users.


Nov 18 '05 #3
I found this c# code, can anyone explain me how to edit it to be used with
DB2?

namespace HowTo.Samples.ADONET
{

using System;
using System.Data.SqlClient;
using System.Data.Db2Client;

public class adooverview1
{
public static void Main()
{
adooverview1 myadooverview1 = new adooverview1();
myadooverview1.Run();
}

public void Run()
{
SqlConnection mySqlConnection = new SqlConnection("Database=SAMPLE;User
ID=administrator; Password=evc++;Server=trilium-1:50000");

try
{
mySqlConnection.Open();
Console.WriteLine("Opened Connection to {0}",
mySqlConnection.ConnectionString);

// Close the connection explicitly
mySqlConnection.Close();
Console.WriteLine("Closed Connection. It is important to close
connections explicitly.");
}
catch
{
Console.WriteLine("Couldn't Open Connection to {0}",
mySqlConnection.ConnectionString);
}
}
}

}

"Rajiv R" <ra********************@yahoo.com> wrote in message
news:OX**************@tk2msftngp13.phx.gbl...
Hi Antoni,

hope these thread help you:
http://www.dotnet247.com/247referenc.../10/53978.aspx
http://groups.google.co.in/groups?hl...threadm=OJOh62 puBHA.2564%40tkmsftngp04&rnum=1&prev=/groups%3Fq%3Dasp.net%2Band%2Bdb2%26hl% 3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3DOJOh62puBHA.2564%2540tkmsftn gp04%26rnum%3D1

http://www.mstechzone.com/Articles/HTML/DB2_Net.htm
http://www.sqlsummit.com/DataProv.htm

--
Cheers!
Rajiv. R
Rajspace.Org

"Antoni Massó Mola" <am****@triliumsoftware.com> wrote in message
news:#U*************@TK2MSFTNGP12.phx.gbl...
I need to connect to my DB2 Server 8.1.3 through ASP .NET pages.

Is there a method to connect to DB2 directly from ASP .NET code without
having to program it with C# or VB .NET?

I need to validate a Username & Password (from an aspx form) with the DB2 Database table Users.


Nov 18 '05 #4
I found out:

OleDbConnection mySqlConnection = new
OleDbConnection("Provider=IBMDADB2.1;Data Source=SAMPLE;User
ID=administrator;Password=xxxxxxx;Network Address=xxx.xxx.xxx.xxx");

"Antoni Massó Mola" <am****@triliumsoftware.com> wrote in message
news:Or**************@TK2MSFTNGP11.phx.gbl...
I found this c# code, can anyone explain me how to edit it to be used with
DB2?

namespace HowTo.Samples.ADONET
{

using System;
using System.Data.SqlClient;
using System.Data.Db2Client;

public class adooverview1
{
public static void Main()
{
adooverview1 myadooverview1 = new adooverview1();
myadooverview1.Run();
}

public void Run()
{
SqlConnection mySqlConnection = new SqlConnection("Database=SAMPLE;User ID=administrator; Password=evc++;Server=trilium-1:50000");

try
{
mySqlConnection.Open();
Console.WriteLine("Opened Connection to {0}",
mySqlConnection.ConnectionString);

// Close the connection explicitly
mySqlConnection.Close();
Console.WriteLine("Closed Connection. It is important to close
connections explicitly.");
}
catch
{
Console.WriteLine("Couldn't Open Connection to {0}",
mySqlConnection.ConnectionString);
}
}
}

}

"Rajiv R" <ra********************@yahoo.com> wrote in message
news:OX**************@tk2msftngp13.phx.gbl...
Hi Antoni,

hope these thread help you:
http://www.dotnet247.com/247referenc.../10/53978.aspx

http://groups.google.co.in/groups?hl...threadm=OJOh62

puBHA.2564%40tkmsftngp04&rnum=1&prev=/groups%3Fq%3Dasp.net%2Band%2Bdb2%26hl%

3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3DOJOh62puBHA.2564%2540tkmsftn
gp04%26rnum%3D1

http://www.mstechzone.com/Articles/HTML/DB2_Net.htm
http://www.sqlsummit.com/DataProv.htm

--
Cheers!
Rajiv. R
Rajspace.Org

"Antoni Massó Mola" <am****@triliumsoftware.com> wrote in message
news:#U*************@TK2MSFTNGP12.phx.gbl...
I need to connect to my DB2 Server 8.1.3 through ASP .NET pages.

Is there a method to connect to DB2 directly from ASP .NET code without having to program it with C# or VB .NET?

I need to validate a Username & Password (from an aspx form) with the DB2 Database table Users.



Nov 18 '05 #5
congrats! :)

--
Cheers!
Rajiv. R
Rajspace.Org
"Antoni Massó Mola" <am****@triliumsoftware.com> wrote in message
news:OP**************@tk2msftngp13.phx.gbl...
I found out:

OleDbConnection mySqlConnection = new
OleDbConnection("Provider=IBMDADB2.1;Data Source=SAMPLE;User
ID=administrator;Password=xxxxxxx;Network Address=xxx.xxx.xxx.xxx");

"Antoni Massó Mola" <am****@triliumsoftware.com> wrote in message
news:Or**************@TK2MSFTNGP11.phx.gbl...
I found this c# code, can anyone explain me how to edit it to be used with
DB2?

namespace HowTo.Samples.ADONET
{

using System;
using System.Data.SqlClient;
using System.Data.Db2Client;

public class adooverview1
{
public static void Main()
{
adooverview1 myadooverview1 = new adooverview1();
myadooverview1.Run();
}

public void Run()
{
SqlConnection mySqlConnection = new

SqlConnection("Database=SAMPLE;User
ID=administrator; Password=evc++;Server=trilium-1:50000");

try
{
mySqlConnection.Open();
Console.WriteLine("Opened Connection to {0}",
mySqlConnection.ConnectionString);

// Close the connection explicitly
mySqlConnection.Close();
Console.WriteLine("Closed Connection. It is important to close
connections explicitly.");
}
catch
{
Console.WriteLine("Couldn't Open Connection to {0}",
mySqlConnection.ConnectionString);
}
}
}

}

"Rajiv R" <ra********************@yahoo.com> wrote in message
news:OX**************@tk2msftngp13.phx.gbl...
Hi Antoni,

hope these thread help you:
http://www.dotnet247.com/247referenc.../10/53978.aspx

http://groups.google.co.in/groups?hl...threadm=OJOh62

puBHA.2564%40tkmsftngp04&rnum=1&prev=/groups%3Fq%3Dasp.net%2Band%2Bdb2%26hl%

3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3DOJOh62puBHA.2564%2540tkmsftn
gp04%26rnum%3D1

http://www.mstechzone.com/Articles/HTML/DB2_Net.htm
http://www.sqlsummit.com/DataProv.htm

--
Cheers!
Rajiv. R
Rajspace.Org

"Antoni Massó Mola" <am****@triliumsoftware.com> wrote in message
news:#U*************@TK2MSFTNGP12.phx.gbl...
> I need to connect to my DB2 Server 8.1.3 through ASP .NET pages.
>
> Is there a method to connect to DB2 directly from ASP .NET code without > having to program it with C# or VB .NET?
>
> I need to validate a Username & Password (from an aspx form) with
the DB2
> Database table Users.
>
>



Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
8524
by: Collin VanDyck | last post by:
I have a basic understanding of this, so forgive me if I am overly simplistic in my explanation of my problem.. I am trying to get a Java/Xalan transform to pass through a numeric character...
1
11417
by: DrTebi | last post by:
Hello, I have the following problem: I used to "encode" my email address within links, in order to avoid (most) email spiders. So I had a link like this: <a...
0
2407
by: Thomas Scheffler | last post by:
Hi, I runned in trouble using XALAN for XSL-Transformation. The following snipplet show what I mean: <a href="http://blah.com/?test=test&amp;test2=test2">Test1&amp;</a> <a...
4
3002
by: Luklrc | last post by:
Hi, I'm having to create a querysting with javascript. My problem is that javscript turns the "&" characher into "&amp;" when it gets used as a querystring in the url EG: ...
4
3203
by: johkar | last post by:
When the output method is set to xml, even though I have CDATA around my JavaScript, the operaters of && and < are converted to XML character entities which causes errors in my JavaScript. I know...
8
2781
by: Nathan Sokalski | last post by:
I add a JavaScript event handler to some of my Webcontrols using the Attributes.Add() method as follows: Dim jscode as String = "return (event.keyCode>=65&&event.keyCode<=90);"...
11
6381
by: Jeremy | last post by:
How can one stop a browser from converting &amp; to & ? We have a textarea in our system wehre a user can type in some html code and have it saved to the database. When the data is retireved...
14
5907
by: Arne | last post by:
A lot of Firefox users I know, says they have problems with validation where the ampersand sign has to be written as &amp; to be valid. I don't have Firefox my self and don't wont to install it only...
12
10059
by: InvalidLastName | last post by:
We have been used XslTransform. .NET 1.1, for transform XML document, Dataset with xsl to HTML. Some of these html contents contain javascript and links. For example: // javascript if (a &gt; b)...
7
4597
by: John Nagle | last post by:
I've been parsing existing HTML with BeautifulSoup, and occasionally hit content which has something like "Design & Advertising", that is, an "&" instead of an "&amp;". Is there some way I can get...
0
7063
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7258
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7313
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6970
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7441
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4987
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4663
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3156
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3146
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.