15,921,837 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by karteekboddu (Top 20 by date)
karteekboddu
5-Jun-13 10:49am
View
I am using a silverlight enabled webservice and i want to pass this data to a method in the service to retrieve the data from the query.
karteekboddu
7-Mar-13 7:49am
View
ok,it was images how to display in gridview
karteekboddu
7-Mar-13 7:31am
View
I was trying to display the data into datagridview all columns are displaying the results except the datatypes like RAW,CLOB and BLOB.
karteekboddu
7-Mar-13 7:21am
View
It was not displaying the column names itself from table which are having datatypes like RAW,CLOB and BLOB?
karteekboddu
4-Mar-13 8:53am
View
oracle.dataaccess.dll
version 10.2.0.100
karteekboddu
4-Mar-13 8:12am
View
yes i did that but i m facing this error
karteekboddu
4-Mar-13 7:46am
View
Yes i have added
karteekboddu
21-Feb-13 1:50am
View
Yes like fast colored textbox dll
karteekboddu
20-Feb-13 10:07am
View
I ran app by keeping break point but it is not throwing any error.
But in runtime its giving exception like OBJECT REFERENCE NOT SET TO INSTANCE OF OBJECT or
some times ARGUMENT EXCEPTION UNHANDLED like INDEX WAS OUT OF RANGE
karteekboddu
20-Feb-13 9:40am
View
Sorry,
public Login()
{
InitializeComponent();
this.txtPassword.KeyPress += new KeyPressEventHandler(CheckKeys);
}
private void CheckKeys(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if (e.KeyChar == (char)13)
{
try
{
string user = txtUser.Text.ToString();
//Constructing connection string from the inputs
if (user == "SYS" || user == "sys" || user == "sys as sysdba")
{
StringBuilder Con = new StringBuilder("Data Source=");
Con.Append(txtTns.Text);
Con.Append(";User ID=");
Con.Append(txtUser.Text);
Con.Append(";Password=");
Con.Append(txtPassword.Text);
Con.Append(";DBA Privilege=SYSDBA");
string strCon = Con.ToString();
var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
var connectionStringsSection = (ConnectionStringsSection)config.GetSection("connectionStrings");
connectionStringsSection.ConnectionStrings["con"].ConnectionString = strCon;
connectionStringsSection.ConnectionStrings["newcon"].ConnectionString = strCon;
config.Save();
ConfigurationManager.RefreshSection("connectionStrings");
// updateConfigFile(strCon);
ConfigurationManager.RefreshSection("connectionStrings");
}
else
{
StringBuilder Con1 = new StringBuilder("Data Source=");
Con1.Append(txtTns.Text);
Con1.Append(";User ID=");
Con1.Append(txtUser.Text);
Con1.Append(";Password=");
Con1.Append(txtPassword.Text);
string strCon1 = Con1.ToString();
var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
var connectionStringsSection = (ConnectionStringsSection)config.GetSection("connectionStrings");
connectionStringsSection.ConnectionStrings["con"].ConnectionString = strCon1;
connectionStringsSection.ConnectionStrings["newcon"].ConnectionString = strCon1;
config.Save();
ConfigurationManager.RefreshSection("connectionStrings");
}
//QBHomep home = new QBHomep();
QueryBuilder home = new QueryBuilder();
this.Cursor = System.Windows.Forms.Cursors.WaitCursor;
home.Show();
this.Hide();
}
catch (Exception E)
{
MessageBox.Show(ConfigurationManager.ConnectionStrings["con"].ToString() + ".This is invalid connection", "Incorrect server/Database");
}
}
karteekboddu
20-Feb-13 9:28am
View
This was the code from Login class
private void btnLogin_Click(object sender, EventArgs e)
{
try
{
string user = txtUser.Text.ToString();
//Constructing connection string from the inputs
if (user == "SYS" || user == "sys" || user == "sys as sysdba")
{
StringBuilder Con = new StringBuilder("Data Source=");
Con.Append(txtTns.Text);
Con.Append(";User ID=");
Con.Append(txtUser.Text);
Con.Append(";Password=");
Con.Append(txtPassword.Text);
Con.Append(";DBA Privilege=SYSDBA");
string strCon = Con.ToString();
var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
var connectionStringsSection = (ConnectionStringsSection)config.GetSection("connectionStrings");
connectionStringsSection.ConnectionStrings["con"].ConnectionString = strCon;
connectionStringsSection.ConnectionStrings["newcon"].ConnectionString = strCon;
config.Save();
ConfigurationManager.RefreshSection("connectionStrings");
// updateConfigFile(strCon);
ConfigurationManager.RefreshSection("connectionStrings");
}
else
{
StringBuilder Con1 = new StringBuilder("Data Source=");
Con1.Append(txtTns.Text);
Con1.Append(";User ID=");
Con1.Append(txtUser.Text);
Con1.Append(";Password=");
Con1.Append(txtPassword.Text);
string strCon1 = Con1.ToString();
var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
var connectionStringsSection = (ConnectionStringsSection)config.GetSection("connectionStrings");
connectionStringsSection.ConnectionStrings["con"].ConnectionString = strCon1;
connectionStringsSection.ConnectionStrings["newcon"].ConnectionString = strCon1;
config.Save();
ConfigurationManager.RefreshSection("connectionStrings");
}
//QBHomep home = new QBHomep();
QueryBuilder home = new QueryBuilder();
this.Cursor = System.Windows.Forms.Cursors.WaitCursor;
home.Show();
this.Hide();
}
catch (Exception E)
{
MessageBox.Show(ConfigurationManager.ConnectionStrings["con"].ToString() + ".This is invalid connection", "Incorrect server/Database");
}
}
public void updateConfigFile(string con)
{
//updating config file
XmlDocument XmlDoc = new XmlDocument();
//Loading the Config file
string path = "..\\..\\App.config";
XmlDoc.Load(path);
foreach (XmlElement xElement in XmlDoc.DocumentElement)
{
if (xElement.Name == "connectionStrings")
{
//setting the coonection string
xElement.FirstChild.Attributes[1].Value = con;
xElement.LastChild.Attributes[1].Value = con;
}
}
//writing the connection string in config file
XmlDoc.Save(path);
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
//protected override void OnPaintBackground(PaintEventArgs e)
//{
// using (LinearGradientBrush brush = ne
karteekboddu
20-Feb-13 6:21am
View
Application.Run(new Login());
karteekboddu
20-Feb-13 6:11am
View
I used ex.message
ex.Message = "Object reference not set to an instance of an object."
karteekboddu
20-Feb-13 5:40am
View
No i didnt had gridview in login form
karteekboddu
20-Feb-13 4:31am
View
Deleted
No i didnt had gridview in login form
karteekboddu
20-Feb-13 1:39am
View
at System.Windows.Forms.DataGridViewRowHeaderCell.PaintPrivate(Graphics graphics, Rectangle clipBounds, Rectangle cellBounds, Int32 rowIndex, DataGridViewElementStates dataGridViewElementState, Object formattedValue, String errorText, DataGridViewCellStyle cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle, DataGridViewPaintParts paintParts, Boolean computeContentBounds, Boolean computeErrorIconBounds, Boolean paint)
at System.Windows.Forms.DataGridViewRowHeaderCell.Paint(Graphics graphics, Rectangle clipBounds, Rectangle cellBounds, Int32 rowIndex, DataGridViewElementStates cellState, Object value, Object formattedValue, String errorText, DataGridViewCellStyle cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle, DataGridViewPaintParts paintParts)
at System.Windows.Forms.DataGridViewCell.PaintWork(Graphics graphics, Rectangle clipBounds, Rectangle cellBounds, Int32 rowIndex, DataGridViewElementStates cellState, DataGridViewCellStyle cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle, DataGridViewPaintParts paintParts)
at System.Windows.Forms.DataGridViewRow.PaintHeader(Graphics graphics, Rectangle clipBounds, Rectangle rowBounds, Int32 rowIndex, DataGridViewElementStates rowState, Boolean isFirstDisplayedRow, Boolean isLastVisibleRow, DataGridViewPaintParts paintParts)
at System.Windows.Forms.DataGridViewRow.Paint(Graphics graphics, Rectangle clipBounds, Rectangle rowBounds, Int32 rowIndex, DataGridViewElementStates rowState, Boolean isFirstDisplayedRow, Boolean isLastVisibleRow)
at System.Windows.Forms.DataGridView.PaintRows(Graphics g, Rectangle boundingRect, Rectangle clipRect, Boolean singleHorizontalBorderAdded)
at System.Windows.Forms.DataGridView.PaintGrid(Graphics g, Rectangle gridBounds, Rectangle clipRect, Boolean singleVerticalBorderAdded, Boolean singleHorizontalBorderAdded)
at System.Windows.Forms.DataGridView.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.DataGridView.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at AISQBTool.Program.Main() in C:\Users\AISC01\Desktop\AISQBTool_11-2-13_integrated\AISQBTool_11-2-13_integrated\AISQBTool\Program.cs:line 22
karteekboddu
19-Feb-13 7:26am
View
yes i had
karteekboddu
19-Feb-13 7:11am
View
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace AISQBTool
{
static class Program
{
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Login());
}
}
}
karteekboddu
13-Feb-13 9:15am
View
Thankyou,
Could you please provide with one example code.
karteekboddu
12-Feb-13 8:18am
View
Thankyou for your solution,
Could you please provide some example code
Show More