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
Rao Varrey
NA
56
3.1k
Can somebody help me to point out the errors in coding.
Sep 20 2017 3:24 AM
using System;
using System.Data.Odbc;
using System.Windows.Forms;
namespace SevenDROPS
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
OdbcConnection myConnection = new OdbcConnection();
OdbcCommand cmd = myConnection.CreateCommand();
string myConnectionString = @"Driver={Microsoft Access Driver (*.mdb)};" + "Dbq=C:/DROPS-Data/Derrick.mdb";
{
myConnection.ConnectionString = myConnectionString;
myConnection.Open();
//execute queries, etc
cmd.CommandText = "SELECT * FROM InspInfo WHERE WONo = 'DROP-001'";
OdbcDataReader reader = cmd.ExecuteReader();
//textBox1.Text = "Transocean Offshore"; //reader.GetString(1);
textBox1.Text = reader["CompanyName"].ToString();
}
The field value is not getting displayed....Error it says "No data exists for the row / column"
Reply
Answers (
1
)
Universal Windows Platform?
Time Attendance Employee Source Code or Tutorial Xamarin???