TAdoQuery parameters & empty strings
From: Cengis (cengis.kocaurlu_at_prodiag.fr)
Date: 08/30/04
- Next message: Viatcheslav V. Vassiliev: "Re: Using SEEK on a TADODataSet"
- Previous message: Brian Wheatley: "Using SEEK on a TADODataSet"
- Next in thread: Viatcheslav V. Vassiliev: "Re: TAdoQuery parameters & empty strings"
- Reply: Viatcheslav V. Vassiliev: "Re: TAdoQuery parameters & empty strings"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 30 Aug 2004 17:14:09 +0200
hello,
i have a TAdoQuery for insert and update task in my access database
all parameters values are taken from TEdit
and the query is like 'INSERT INTO mytable(name,...) VALUES(:name,...);'
i use the following code to set parameters values:
myAdoQuery.parameters.parambyname('name').value := MyNameEdit.Text
it work fine when i don't have an empty string in the TEdit, but when
MyNameEdit.Text is empty i get an error (when i execute the query)
[microsoft][Driver ODBC Microsoft Access] value precision not valid
it seems to be specific to the tadoquery component, when i use TQuery
and BDE it work fine (with bde i use param.asString for exemple, but i
don't find where i can specify the conversion type for ADOQuery parameters)
any idea to fix that ?
- Next message: Viatcheslav V. Vassiliev: "Re: Using SEEK on a TADODataSet"
- Previous message: Brian Wheatley: "Using SEEK on a TADODataSet"
- Next in thread: Viatcheslav V. Vassiliev: "Re: TAdoQuery parameters & empty strings"
- Reply: Viatcheslav V. Vassiliev: "Re: TAdoQuery parameters & empty strings"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|