Posts Tagged ‘2010’

India 2010 trip to Calcutta, Chennai, Mumbai, Jaipur, Agra, New Delhi

India 2010 trip to Calcutta, Chennai, Mumbai, Jaipur, Agra, New Delhi
Video Rating: 5 / 5

Tags: , , , , , , , ,

1 Comment


Linking a webiste in Visual Studio 2010 to a Access Database?

Question by Jack and Coke: Linking a webiste in Visual Studio 2010 to a Access Database?
Good morning. I am working on a project and been ripping my hair out for 2 day. I have a frmClient-Register and once a user inputs data into the text fields it is suppose to insert it into the database and it is not. I am about to punt my computer and i know it is a small step I am missing can anyone help me out thanks.
Here is my code.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Client_Register : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void txtClientFirst_TextChanged(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{

try
{

string currentPath = Server.MapPath(“C:/Users/Jeremy/Downloads/pr/pr/TPS_DB.accdb”); //Get Path Of DataBase

System.Data.OleDb.OleDbConnection cn = new System.Data.OleDb.OleDbConnection(“Provider=Microsoft.ACE.OLEDB.12.0;Data Source=” + currentPath + “”); // Create An Object Connection For Microsoft Access
System.Data.OleDb.OleDbCommand cmd = new System.Data.OleDb.OleDbCommand(“insert into tblclient values (@mail, @PW,@company,@Fname,@Lname,@Adresse1,@Adresse2,@city,@state,@zip,@phone,@fax )”, cn); // Create An object Query to Insert into DataBase From TextBox

cmd.Parameters.AddWithValue(“@mail”, txtClientEmail.Text);// Set A parameter Value from TextBox Email
cmd.Parameters.AddWithValue(“@PW”, txtClientPW.Text);// Set A parameter Value from TextBox Password
cmd.Parameters.AddWithValue(“@company”, txtClientCompany.Text);
cmd.Parameters.AddWithValue(“@Fname”, txtClientFirst.Text);
cmd.Parameters.AddWithValue(“@Lname”, txtClientLast.Text);
cmd.Parameters.AddWithValue(“@Adresse1″, txtClientAddress1.Text);
cmd.Parameters.AddWithValue(“@Adresse2″, txtClientAddress2.Text);
cmd.Parameters.AddWithValue(“@city”, txtClientCity.Text);
cmd.Parameters.AddWithValue(“@state”, txtClientCity.Text);
cmd.Parameters.AddWithValue(“@zip”, txtClientZip.Text);
cmd.Parameters.AddWithValue(“@phone”, txtClientPhone.Text);
cmd.Parameters.AddWithValue(“@fax”, txtClientFax.Text);

cn.Open(); //open Connection Between Database And Your Site

cmd.ExecuteNonQuery(); // Send Query

Page.Response.Redirect(“~/”); // redirect To Master Page when the information was inserted with Success.

}

catch{
}
}

void GridView1_SelectedIndexChanged(Object sender, GridViewSelectEventArgs e)
{

}
}

Best answer:

Answer by Dan
You’re declaring your Command object wrong: it’s not bound to the connection (i.e. it doesn’t magically know which connection to use). You want to say this:

cn.Open(); // Do this first, before you do anything else – currently, you have it at the end…

OleDbCommand cmd = cn.CreateCommand();
cmd.CommandText=”“;
cmd.CommandType=CommandType.Text;

… and then go on with your parameters and things as you have been doing.

Also, take a look at the website settings in IIS and see which Application Pool the site is using. Then go to the Application Pool and see which user it’s running as. Then, in Windows Explorer, make sure that user has all rights to the file which is the Access database. Mostly, these things fail because of access rights rather than most other things.

Incidentally, if you put “using System.Data;” and “using System.Data.OleDb;” at the top, then you don’t have to keep referencing those namespaces all the way through your code, so it’s more readable (like my code above).

Give your answer to this question below!

Tags: , , , , , ,

No Comments


CDAC Pune DESD SEP 2010— Tour De MahaBaleshwar

Video Rating: 0 / 5

Video Rating: 5 / 5

Tags: , , , , ,

No Comments


IGNISENSE- 2010 , SIIB

This is an intro. video to Ignisense – 2010, The management symposium of Symbiosis Institute of International Business (SIIB). Ignisense – 10 is gonna take place on16th & 17th January, 2010. Keep watching www.siib.edu for more details.

Tags: , ,

No Comments


Access 2010 or Access 2007 Database Question?

Question by hithere11757: Access 2010 or Access 2007 Database Question?
I want an Access database that will generate invoices for my office. How do I create a FORM in Access that, when I choose a company from my a drop down list of companies, it will populate some more information in the form like the company’s address, phone number etc, so that all I have to do is enter the product they purchased, total it, and print it?

Best answer:

Answer by Bubbie
Build it! If you want a database then you have to learn Access and create it or pay someone to set it up or for their template.

What do you think? Answer below!

Tags: , , , ,

No Comments


Peter Joseph – Social Pathology (The Zeitgeist Movement NYC 2010 ZDAY)

Peter Joseph über die Krankheitslehre der Gesellschaft Vortrag am ZDAY2010 in NewYorkCity
Video Rating: 5 / 5

Tags: , , , , , , ,

No Comments


B – Quizzed @ SIBM Pune 2010

Upcoming National Level Quiz at SIBM Pune. An Aspirant Relations Team initiative.
Video Rating: 5 / 5

Tags: , , ,

3 Comments


MITSOM HOLI 2010 SENTOSA Pune.mp4

HOLI HAI 2010 Its masti time at Pune for MBA MITIANS 2005 batch at SENTOSA Pune…a video gift from White Singh to the AYEEEEE GUYS….is video ke chakkar mein my mobile got almost dwowned in water bhai………..
Video Rating: 0 / 5

Tags: , , , ,

No Comments


Take off Flight from Bagalore to Pune on 15th Dec 2010

Tags: , , , , , ,

No Comments


BIMHRD ( Balaji Institute of Management & Human Resource Development ) promo 2010 by Abey Abraham

BIMHRD ( Balaji Institute of Management & Human Resource Development ) promo video www.bimhrdpune.com, Script Direction Editing Sound Design: Abey Abraham Cinematography: Pratik Deora Vfx: Divya Singh Executive Producer: Sajad Sadiq Line Producers: Kushal Mundhada, Dikshu Gupta Narration: Winston Sampayo For Ads & promotional videos Contact : magictalkies@gmail.com
Video Rating: 5 / 5

Tags: , , , , , , , , , ,

1 Comment



SetPageWidth