TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
nalla
NA
1
0
problem in connecting to oracle data in C# in windows 7
Jun 26 2010 2:20 AM
hello
this is the code i used to connect to the oracle database but it is not getting connected. Is there anything wrong in the code or i heard that in windows 7 the connection does not happen...can some one please help me
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.OracleClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication9
{
public partial class Form1 : Form
{
// OracleCommand cmd;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
OracleConnection con;
string str = "Data Source=orcl;User Id=scott;Password=tiger;";
con = new OracleConnection(str);
con.Open();
if (con.State == ConnectionState.Open)
{
MessageBox.Show("database connected");
}
else
{
MessageBox.Show("database not connected");
}
}
Reply
Answers (
1
)
string-was-not-recognized-as-a-valid-datetime error.
how t o view the excel sheet data in grid view in C#lang.