Wrox Programmer Forums
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 13th, 2006, 04:49 PM
Registered User
Join Date: Jul 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default This piece of code is giving an error

The code is giving the error:

An unhandled exception of type 'System.NullReferenceException' occurred in WindowsApplication2.exe

Additional information: Object reference not set to an instance of an object.

Here is the code:

OleDbConnection connToStore = new OleDbConnection( @"Provider=Microsoft.Jet.OLEDB.4.0; User Id=; Password=; Data source= "+db_storage);

string cmdstr = "INSERT INTO trans_table( dataElement1, dataElement2, transformationDetail )" + "VALUES ('"+listBox_for_db1.Items[indexOfItemUnderMouseToDrag].ToString()+"','"+listBox_for_db2.Items[indexOfItemUnderMouseToDrag].ToString()+"','"+textBox_for_transformation.Text+ "')";

this.adapt.InsertCommand.Connection = connToStore;
this.adapt.InsertCommand.CommandText = cmdstr;


Old July 14th, 2006, 09:10 PM
Wrox Technical Editor
Join Date: Dec 2005
Posts: 271
Thanks: 0
Thanked 0 Times in 0 Posts

This thread is cross posted, view the active post here: http://p2p.wrox.com/topic.asp?TOPIC_ID=47002

- Adam Kahtava [http://adam.kahtava.com]

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about a piece of code chobo2 C# 2008 aka C# 3.0 8 November 30th, 2008 11:53 AM
How to delete a piece of code Charlie05 C# 2005 2 August 3rd, 2008 11:32 AM
Need help with a small piece of code (New to VB) kwik10z Excel VBA 2 October 12th, 2007 06:46 AM
This piece of code is giving an error sourik C# 2 July 15th, 2006 09:18 AM
What does this piece of code do? mito_lal Oracle 1 July 11th, 2006 06:44 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.