Re: data type mismatch
From: Joe \ (joe_at_bftsi0.UUCP)
Date: 03/16/04
- Next message: Bonj: "RE: how to get full printer path when printing a dos prompt"
- Previous message: Joe \: "Re: Jet grounded?"
- In reply to: Neil Fallon: "data type mismatch"
- Next in thread: Jezebel: "Re: data type mismatch"
- Reply: Jezebel: "Re: data type mismatch"
- Reply: Neil Fallon: "Re: data type mismatch"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 16 Mar 2004 01:40:49 -0800
"Neil Fallon" <nfallo@comcast.net> wrote in message <news:Bbz5c.20021$1p.421577@attbi_s54>...
> I'm getting a data type mismatch on a simple insert statement into an Access
> database. The following is the code.
>
> If strTableName = "palm_colors" Then
> strStatement2 = "INSERT INTO palm_colors ([UniqueID], [Category],
> [Dirty], [Secret], [color]) VALUES ('"
> strStatement2 = strStatement2 & Null & "', '"
> strStatement2 = strStatement2 & Null & "', '"
> strStatement2 = strStatement2 & True & "', '"
> strStatement2 = strStatement2 & False & "', '"
> strStatement2 = strStatement2 & txtFields(0).Text & "')"
> End if
>
> UniqueID is a numeric field of type integer
> Category is a numeric field of type integer
> Dirty is a yes/no field of type true/false
> Secret is a yes/no field of type true/false
> color is a text field
>
> All of the fields can be null
What does a Debug.Print strStatement2 show? What will happen
when someone tries to add an entry with an apostrophe in it?
(Updating through Recordsets has gotten a bum rap, IMO) Why
are these fields nullable, anyway? Null usually causes more
and nastier problems than it solves.
-- Joe Foster <mailto:jlfoster%40znet.com> DC8s in Spaace: <http://www.xenu.net/> WARNING: I cannot be held responsible for the above They're coming to because my cats have apparently learned to type. take me away, ha ha!
- Next message: Bonj: "RE: how to get full printer path when printing a dos prompt"
- Previous message: Joe \: "Re: Jet grounded?"
- In reply to: Neil Fallon: "data type mismatch"
- Next in thread: Jezebel: "Re: data type mismatch"
- Reply: Jezebel: "Re: data type mismatch"
- Reply: Neil Fallon: "Re: data type mismatch"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|