Asp sql statement still not resolved

Asp sql statement still not resolved

am 02.01.2005 22:43:01 von jack

Hi I have a asp sql statement that translated the sql statement as follows:

UPDATE tblGMISExpenditures_Quarter SET
tblGMISExpenditures_Quarter.CurrentOutlay= '$0.00' ,
tblGMISExpenditures_Quarter.LocalShare= '$0.00' ,
tblGMISExpenditures_Quarter.MBCCShare= '0' ,
tblGMISExpenditures_Quarter.UnpaidOblig= '$0.00' ,
tblGMISExpenditures_Quarter.LocalShareUnpaidOblig= '$0.00' ,
tblGMISExpenditures_Quarter.ProjectIncome= '$0.00' ,
tblGMISExpenditures_Quarter.ForfeitureIncome= '$0.00' ,
tblGMISExpenditures_Quarter.OtherExpense= '$0.00' ,
tblGMISExpenditures_Quarter.ForfeitureExpense= '$0.00' ,
tblGMISExpenditures_Quarter.InterestReceived= '$0.00' ,
tblGMISExpenditures_Quarter.TotalPeriodOutlay= '31233.98' ,
tblGMISExpenditures_Quarter.Remarks= '' , tblGMISExpenditures_Quarter.Name=
'' , tblGMISExpenditures_Quarter.Title= '' ,
tblGMISExpenditures_Quarter.AreaCode= '' ,
tblGMISExpenditures_Quarter.Phone1= '' , tblGMISExpenditures_Quarter.Phone2=
'' , tblGMISExpenditures_Quarter.Date= '1/2/2005' where
tblGMISExpenditures_Quarter.SubgrantIntID = 5217;

With this statement when I am trying to update the table, it gives error
stating

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Field
'tblGMISExpenditures_Quarter.Remarks' cannot be a zero-length string.
Same is the error for Title, AreaCode, Phone1, Phone2. Each of the above is
of data type text. Cannot figure out why this is happening.
Any help is appreciated. Thanks.

Re: Asp sql statement still not resolved

am 02.01.2005 23:09:17 von exjxw.hannivoort

=?Utf-8?B?SmFjaw==?= wrote on 02 jan 2005 in
microsoft.public.inetserver.asp.db:

> 'tblGMISExpenditures_Quarter.Remarks' cannot be a zero-length string.

because the field is defined as a number, a date or whatever?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Re: Asp sql statement still not resolved

am 03.01.2005 01:32:14 von reb01501

Jack wrote:
> Hi I have a asp sql statement that translated the sql statement as
> follows:

>
> With this statement when I am trying to update the table, it gives
> error stating
>
> Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80004005)

Nothing to do with your problem but: stop using the obsolete ODBC driver.
There's a perfectly good native OLEDB provider for Jet that will perform
better and give you more functionality. See
http://www.aspfaq.com/show.asp?id=2126

> [Microsoft][ODBC Microsoft Access Driver] Field
> 'tblGMISExpenditures_Quarter.Remarks' cannot be a zero-length string.

Open your database in Access and open your table in Design View. Highlight
one of the fields in question and look in the lower pane of the design
window. See the property "Allow zero-length strings"? You need to set that
property to allow zero-lenght strings.

alternatively, you can pass a string such as "NA" when your vbscript (not
asp) code detects an attempt to set the field value to an empty string.

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: Asp sql statement still not resolved

am 03.01.2005 05:57:18 von jack

Thanks for your advise. Changing the allow zero-length string solved the
problem.
Regards

"Bob Barrows [MVP]" wrote:

> Jack wrote:
> > Hi I have a asp sql statement that translated the sql statement as
> > follows:
>
> >
> > With this statement when I am trying to update the table, it gives
> > error stating
> >
> > Error Type:
> > Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
>
> Nothing to do with your problem but: stop using the obsolete ODBC driver.
> There's a perfectly good native OLEDB provider for Jet that will perform
> better and give you more functionality. See
> http://www.aspfaq.com/show.asp?id=2126
>
> > [Microsoft][ODBC Microsoft Access Driver] Field
> > 'tblGMISExpenditures_Quarter.Remarks' cannot be a zero-length string.
>
> Open your database in Access and open your table in Design View. Highlight
> one of the fields in question and look in the lower pane of the design
> window. See the property "Allow zero-length strings"? You need to set that
> property to allow zero-lenght strings.
>
> alternatively, you can pass a string such as "NA" when your vbscript (not
> asp) code detects an attempt to set the field value to an empty string.
>
> Bob Barrows
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>
>