pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
cant insert into a post gre sql table...Can u please help in fixing this
4+ messages / 3 participants
[nested] [flat]

* cant insert into a post gre sql table...Can u please help in fixing this
@ 2014-04-14 07:49 kona ajay <konaajay@gmail.com>
  2014-04-14 07:51 ` Fwd: cant insert into a post gre sql table...Can u please help in fixing this kona ajay <konaajay@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: kona ajay @ 2014-04-14 07:49 UTC (permalink / raw)
  To: pgsql-bugs

                              Please help me in fixing this . Thanking you

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Attachments:

untitled.bmp (image/bmp, 2.3M) download view image
^ permalink raw reply [nested|flat] 4+ messages in thread

* Fwd: cant insert into a post gre sql table...Can u please help in fixing this
  2014-04-14 07:49 cant insert into a post gre sql table...Can u please help in fixing this kona ajay <konaajay@gmail.com>
@ 2014-04-14 07:51 ` kona ajay <konaajay@gmail.com>
  2014-04-14 17:54   ` Re: Fwd: cant insert into a post gre sql table...Can u please help in fixing this John R Pierce <pierce@hogranch.com>
  2014-04-14 19:33   ` Re: Fwd: cant insert into a post gre sql table...Can u please help in fixing this David G Johnston <david.g.johnston@gmail.com>
  0 siblings, 2 replies; 4+ messages in thread

From: kona ajay @ 2014-04-14 07:51 UTC (permalink / raw)
  To: pgsql-bugs

here i am sending my actual code







  string employee = "insert into  VSP_Employee values ('" + txtEmpid.Text +
"','" + txtEmpname.Text + "','" + txtEmailid.Text + "','" + txtphnum.Text +
"','" + txtDOB.Text + "','"  +txtDOJ.Text + "','" + txtNOD.Text + "','" +
txtSalary.Text + "','" + txtLeavestaken.Text + "','" +
txtLeavesBalance.Text + "','" + txtPlannedleaves.Text+"')";
                    NpgsqlDataAdapter da = new NpgsqlDataAdapter(employee,
conn);
                    cmd = new NpgsqlCommand(employee, conn);
                    da = new  NpgsqlDataAdapter(cmd);
                    ds = new DataSet();
                    da.Fill(ds, "VSP_Employee");



                              Please help me in fixing this . Thanking you

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Attachments:

untitled.bmp (image/bmp, 2.3M) download view image
^ permalink raw reply [nested|flat] 4+ messages in thread

* Re: Fwd: cant insert into a post gre sql table...Can u please help in fixing this
  2014-04-14 07:49 cant insert into a post gre sql table...Can u please help in fixing this kona ajay <konaajay@gmail.com>
  2014-04-14 07:51 ` Fwd: cant insert into a post gre sql table...Can u please help in fixing this kona ajay <konaajay@gmail.com>
@ 2014-04-14 17:54   ` John R Pierce <pierce@hogranch.com>
  1 sibling, 0 replies; 4+ messages in thread

From: John R Pierce @ 2014-04-14 17:54 UTC (permalink / raw)
  To: pgsql-bugs

On 4/14/2014 12:51 AM, kona ajay wrote:
>           Please help me in fixing this . Thanking you

the error seems pretty explicit.    "relation vsp_employee does not exist"

I fail to see how this is a postgres bug.


btw, thats a terrible way of programming SQL queries.  a all someone 
would have to do would be to enter

     '); drop table vsp_employee;

as an employee name and you'd be in a world of hurt.  you should instead 
pass in the data values as arguments to a parametrized query.   as I 
don't do .NET stuff, you'll need to look up how to do that yourself.

-- 
john r pierce                                      37N 122W
somewhere on the middle of the left coast



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Fwd: cant insert into a post gre sql table...Can u please help in fixing this
  2014-04-14 07:49 cant insert into a post gre sql table...Can u please help in fixing this kona ajay <konaajay@gmail.com>
  2014-04-14 07:51 ` Fwd: cant insert into a post gre sql table...Can u please help in fixing this kona ajay <konaajay@gmail.com>
@ 2014-04-14 19:33   ` David G Johnston <david.g.johnston@gmail.com>
  1 sibling, 0 replies; 4+ messages in thread

From: David G Johnston @ 2014-04-14 19:33 UTC (permalink / raw)
  To: pgsql-bugs

kona ajay wrote
> "insert into  VSP_Employee values [...]

If you managed to create the table in a case-sensitive manner you will need
to refer to it in the same way - namely with double-quotes surrounding the
identifier.  Otherwise all identifiers are case-folded to lower case.

"VSP_Employee" -> same
VSP_Employee -> vsp_employee

My other guess is you think you are hitting a database with the table but in
reality you are connecting to a different database where the table does not
exist.

David J.



--
View this message in context: http://postgresql.1045698.n5.nabble.com/cant-insert-into-a-post-gre-sql-table-Can-u-please-help-in-f...
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2014-04-14 19:33 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-04-14 07:49 cant insert into a post gre sql table...Can u please help in fixing this kona ajay <konaajay@gmail.com>
2014-04-14 07:51 ` kona ajay <konaajay@gmail.com>
2014-04-14 17:54   ` John R Pierce <pierce@hogranch.com>
2014-04-14 19:33   ` David G Johnston <david.g.johnston@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox