|
Posted by Ed Murphy on 07/24/06 06:26
On 23 Jul 2006 22:36:15 -0700, prabhukumarasamy@gmail.com wrote:
>Now i m working in a existing project. I have to do some updations. In
>that project database table contain a table(usergroups) field name as
>'Name'.
Lex Luthor: "Are you /sure/?"
>When i am trying to insert a new record in (usergoups) table
>like as follows'
>
>
>insert into UserGroups(Name,modusr,moddt) values ('sam',131,'7/23/2006
>10:02:13 PM')
>
>
>The response ll come as follows,
>
>
>Invalid column name 'FirstName'.Invalid column name 'LastName'.
>
>The usergroups table structure is as follows,
>
>
> UserGroupId int 4 (PK field)
> Name varchar 50
> modusr int 4
> moddt datetime 8
Again, are you sure?
>Plz tell the correct insert query to add records for the above
>table....
If the table structure is indeed as you describe, and if UserGroupID
is auto-assigned, then your insert should be fine.
I suspect the table structure is not as you describe. What does
"select * from UserGroups" give you? (Just the headers and first
line of data would suffice.)
Perhaps the table has "Name" *and* "FirstName" and "LastName" columns,
with trigger logic (which may or may not be smart).
Are you sure you're accessing the right database?
[Back to original message]
|