473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

OleDbexception error?

Hello,

I have the following SQL statement in an OleDbDataAdapter:

SELECT Customers.Watch, Format(FinStmts.[Expiration Date], 'MM/DD/YY') AS ExpDate, Customers.FullName, Customers.Phone1, Customers.SSN, FinStmts.RecordID
FROM ((Officer INNER JOIN
FinStmts ON Officer.RecordID = FinStmts.OfficerID) INNER JOIN
Customers ON FinStmts.CustomerID = Customers.RecordID)
WHERE (FinStmts.[Expiration Date] < NOW()) AND (Officer.RecordID = ?) AND (NOT (FinStmts.[Expiration Date] IS NULL))

In my code I have:
Dim OfficerID As Long
OfficerId=9

Dim par As New OleDbParameter("RecordID", OleDbType.Integer)
par.Value = OfficerID
OleDbdaCCTickler.SelectCommand.Parameters.Add(par)
OleDbdaCCTickler.Fill(DsCCTickler1)
dgTickler.DataBind()

I get the following error:

ERROR: System.Data.OleDb.OleDbException: Parameter ?_1 has no default value. at System.Data.OleDb.OleDbCommand.ExecuteCommandTextE rrorHandling(Int32 hr) at .

In the Parameter Collection Editor of the DataAdapter I have:

Members: (0)=RecordID

With the properties:
Direction=Input
OleDbType=Integer
Precision=0
Scale=0
Size=0
SourceColumn=RecordID
SourceVersion=Current
Value=
Parametername = RecordID

All I am trying to do is pass the parameter to the DataAdapter.
I am using an MS Access database.
Nov 20 '05 #1
0 851

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: G.Esmeijer | last post by:
Friends, The following code works fin. BUT... after a >> couple times<< this code is used is a class it comes with an error saying unhandled System.Data.OleDb.OleDbException' occurred in...
0
by: silesius | last post by:
I've been using VS 2003 to develop a webapplication using C#. Today I exported the application to a remote webserver I begun experiencing problems. It's a simple application that retrieves some...
1
by: T8 | last post by:
I have a asp.net (framework 1.1) site interfacing against SQL 2000. It runs like a charm 99% of the time but once in a while I get the following "unspecified error". Sometimes it would resolve by...
2
by: jn | last post by:
Hi, I'm passing around 30 arguments to a stored procedure, and I got the following error (see below). It works fine if I narrow down to around 25 args. Is there any workaround to bypass this...
0
by: silesius | last post by:
I've been using VS.NET 2003 to develop a webapplication using C#. Today I exported the application to another webserver I begun experiencing problems. It's a simple application that retrieves...
0
by: NicK chlam via DotNetMonster.com | last post by:
this is the error i get System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement. at System.Data.Common.DbDataAdapter.Update(DataRow dataRows, DataTableMapping tableMapping) at...
7
by: Jim McGivney | last post by:
ASPX page from VS.net-C# on host's computer using oleDataAdaptor to connect to Microsoft Access database. The page loads, but when connection to the database is attempted to fill a datagrid the...
5
by: petro | last post by:
Hello all, My asp.net web application works on my machine but I get the following error on our test web server, There is only one oracle home on the test server. Does anyone know how to resolve...
6
by: Learner | last post by:
Hi there, I am trying to access the access database sitting at OleDbConnection oleConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Program Files\\Microsoft Visual...
0
by: mkahn | last post by:
Fater leaving my computer for a few minutes. I tried to continue working with the page am on. Seems to be that after my connection timed out, am not able to reconnect to the data base getting the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.