|
 |
ado_dotnet thread: odd errors with simple sql statments
Message #1 by "mike" <MIKEZCG@Y...> on Thu, 26 Dec 2002 18:14:56
|
|
I GET THIS MSG : no values given for one or more required paramaters
WITH THIS CODE : AS FAR AS I CAN SEE I HAVE 4 FIELDS AND 4 VALS WHATS UP
sSql = "INSERT INTO Vendors ( CFVend, NAME, DfltAcct, VendorCF)"
sSql += " Values(505094, Mike, 60300, 5555)"
WITH THIS CODE :
Dim sSql As String = "Update(COA) "
sSql += "set Acct = 10317 "
sSql += "WHERE(Acct = 103717)"
I GET THIS MSG :
DATA TYPE MISMATCH IN CRITERIA EXPRESSION
THIS IS THE SCHEMA :
type size name
TEXT 255 ACCT
TEXT 50 PK
TEXT 255 NAME
DUdes am i losing my mind??
Message #2 by "Chuck Snyder" <csnyder@p...> on Thu, 26 Dec 2002 10:23:42 -0800
|
|
How about single quotes arount 'Mike'
-----Original Message-----
From: mike [mailto:MIKEZCG@Y...]
Sent: Thursday, December 26, 2002 10:15 AM
To: ADO.NET
Subject: [ado_dotnet] odd errors with simple sql statments
I GET THIS MSG : no values given for one or more required paramaters
WITH
THIS CODE : AS FAR AS I CAN SEE I HAVE 4 FIELDS AND 4 VALS WHATS UP
sSql =3D
"INSERT INTO Vendors ( CFVend, NAME, DfltAcct, VendorCF)"
sSql +=3D " Values(505094, Mike, 60300, 5555)"
WITH THIS CODE :
Dim sSql As String =3D "Update(COA) "
sSql +=3D "set Acct =3D 10317 "
sSql +=3D "WHERE(Acct =3D 103717)"
I GET THIS MSG :
DATA TYPE MISMATCH IN CRITERIA EXPRESSION
THIS IS THE SCHEMA :
type size name
TEXT 255 ACCT
TEXT 50 PK
TEXT 255 NAME
DUdes am i losing my mind??
=3D=3D=3D
Fast Track ADO.NET with C# is a concise introduction to the concepts,
techniques, and libraries that you will need in order to start using
ADO.NET
in your applications. The book covers DataSets and Typed DataSets,
accessing
data using DataReaders and DataAdaptors, the close relationship between
ADO.NET and XML, how and where to use ADO.NET in your enterprise
applications, and how to use Web Services and ADO.NET to easily pass
data
between applications. http://www.wrox.com/books/1861007604.htm
Message #3 by Greg Griffiths <greg2@s...> on Thu, 26 Dec 2002 19:25:49 +0000
|
|
Try putting a single quote - ' - around your strings in the VALUES clause.
At 18:14 26/12/02 +0000, you wrote:
>I GET THIS MSG : no values given for one or more required paramaters
>WITH THIS CODE : AS FAR AS I CAN SEE I HAVE 4 FIELDS AND 4 VALS WHATS UP
> sSql = "INSERT INTO Vendors ( CFVend, NAME, DfltAcct, VendorCF)"
> sSql += " Values(505094, Mike, 60300, 5555)"
>
>
>WITH THIS CODE :
> Dim sSql As String = "Update(COA) "
> sSql += "set Acct = 10317 "
> sSql += "WHERE(Acct = 103717)"
>
>I GET THIS MSG :
>DATA TYPE MISMATCH IN CRITERIA EXPRESSION
>
>THIS IS THE SCHEMA :
>type size name
>TEXT 255 ACCT
>TEXT 50 PK
>TEXT 255 NAME
>
>DUdes am i losing my mind??
>===
>Fast Track ADO.NET with C# is a concise introduction to the concepts,
>techniques, and libraries that you will need in order to start using
>ADO.NET in your applications. The book covers DataSets and Typed DataSets,
>accessing data using DataReaders and DataAdaptors, the close relationship
>between ADO.NET and XML, how and where to use ADO.NET in your enterprise
>applications, and how to use Web Services and ADO.NET to easily pass data
>between applications.
>http://www.wrox.com/books/1861007604.htm
Message #4 by Richard Ainsley <rainsley@p...> on Thu, 26 Dec 2002 13:08:57 -0800
|
|
The table has additional required fields that you have not defined and which
also lack a default value in their field definition(s). Check the table
definition to find out what they are.
-----Original Message-----
From: mike [mailto:MIKEZCG@Y...]
Sent: Thursday, December 26, 2002 6:15 PM
To: ADO.NET
Subject: [ado_dotnet] odd errors with simple sql statments
I GET THIS MSG : no values given for one or more required paramaters
WITH THIS CODE : AS FAR AS I CAN SEE I HAVE 4 FIELDS AND 4 VALS WHATS UP
sSql = "INSERT INTO Vendors ( CFVend, NAME, DfltAcct, VendorCF)"
sSql += " Values(505094, Mike, 60300, 5555)"
WITH THIS CODE :
Dim sSql As String = "Update(COA) "
sSql += "set Acct = 10317 "
sSql += "WHERE(Acct = 103717)"
I GET THIS MSG :
DATA TYPE MISMATCH IN CRITERIA EXPRESSION
THIS IS THE SCHEMA :
type size name
TEXT 255 ACCT
TEXT 50 PK
TEXT 255 NAME
DUdes am i losing my mind??
===
Fast Track ADO.NET with C# is a concise introduction to the concepts,
techniques, and libraries that you will need in order to start using ADO.NET
in your applications. The book covers DataSets and Typed DataSets, accessing
data using DataReaders and DataAdaptors, the close relationship between
ADO.NET and XML, how and where to use ADO.NET in your enterprise
applications, and how to use Web Services and ADO.NET to easily pass data
between applications.
http://www.wrox.com/books/1861007604.htm
|
|
 |