Mischamel Posted June 23, 2003 Posted June 23, 2003 An unhandled exception of type 'System.NullReferenceException' occurred in commandbuilder (projectname).exe. Additional information: Value null was found where an instance of an object was required. Code : im INSERTCommand As New OleDbCommand(SQLStr, OleDbConnection1) In another Sub I declared a Command, too and it works. What´s wrong in here ?? Can I run an Insertion which doesn´t set several Fieldvalues ?? F.ex 8 cols are setable, but I just insert 5,the PK is inserted,of course. Do I have to set the missing vals as Null ??? Thanks Quote Sometimes you´ve got to make a silent Takedown .
*Experts* mutant Posted June 23, 2003 *Experts* Posted June 23, 2003 It has nothing to do with your table values. How did you declare your connection? Quote
viast Posted June 23, 2003 Posted June 23, 2003 What does your SQLStr look like. Check all the columns of the table. all the columns which do not have Allow Null against them should have some value in SQLStr. Quote
Mischamel Posted June 27, 2003 Author Posted June 27, 2003 Its a standard connection, declared by VB.Net Here´s the con.-string: Provider=Microsoft.Jet.OLEDB.4.0;Password="";User ID=Admin;Data Source=D:\Projekte\PAMTool_2\Data\PAMTool.mdb;Mode=ReadWrite;Extended Properties="";Jet OLEDB:System database="";Jet OLEDB:Registry Path="";Jet OLEDB:Database Password="";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False Quote Sometimes you´ve got to make a silent Takedown .
*Experts* Nerseus Posted June 27, 2003 *Experts* Posted June 27, 2003 Can we see ALL of the code in question? -Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.