insert query in sql server

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rj

    #1

    insert query in sql server

    When I try to insert a row in the SQL server. I received these warnings :

    Warning: mssql_query() [function.mssql-query]: message: Invalid object name
    'transactions'. (severity 16) in
    C:\aisservice\a isservice\inc\d atabase\mssql.p hp on line 169

    Warning: mssql_query() [function.mssql-query]: Query failed in
    C:\aisservice\a isservice\inc\d atabase\mssql.p hp on line 169
    INSERT INTO users (login,domain,e mail,credit,ent rance_bonus)VAL UES
    ('klaas','klaas ','klaas',0,6.0 0)

    The record is inserted in the database. But what is wrong? When starting a
    SELECT query everthing is running fine. When doing an update same message
    appears.

    Who can tell me more about this.
    Many thanks in advance

    Richard


  • Tony Clarke

    #2
    Re: insert query in sql server

    What code is on line 169?
    Try putting single quotations around the numbers eg '0','6.00'



    "rj" <rj@guppie.mine .nu> wrote in message
    news:nS5pd.2143 9$lN.2321@amsne ws05.chello.com ...[color=blue]
    > When I try to insert a row in the SQL server. I received these warnings :
    >
    > Warning: mssql_query() [function.mssql-query]: message: Invalid object[/color]
    name[color=blue]
    > 'transactions'. (severity 16) in
    > C:\aisservice\a isservice\inc\d atabase\mssql.p hp on line 169
    >
    > Warning: mssql_query() [function.mssql-query]: Query failed in
    > C:\aisservice\a isservice\inc\d atabase\mssql.p hp on line 169
    > INSERT INTO users (login,domain,e mail,credit,ent rance_bonus)VAL UES
    > ('klaas','klaas ','klaas',0,6.0 0)
    >
    > The record is inserted in the database. But what is wrong? When starting a
    > SELECT query everthing is running fine. When doing an update same message
    > appears.
    >
    > Who can tell me more about this.
    > Many thanks in advance
    >
    > Richard
    >
    >[/color]


    Comment

    • Pedro Graca

      #3
      Re: insert query in sql server

      rj wrote:[color=blue]
      > When I try to insert a row in the SQL server. I received these warnings :
      >
      > Warning: mssql_query() [function.mssql-query]: message: Invalid object name
      > 'transactions'. (severity 16) in
      > C:\aisservice\a isservice\inc\d atabase\mssql.p hp on line 169
      >
      > Warning: mssql_query() [function.mssql-query]: Query failed in
      > C:\aisservice\a isservice\inc\d atabase\mssql.p hp on line 169
      > INSERT INTO users (login,domain,e mail,credit,ent rance_bonus)VAL UES
      > ('klaas','klaas ','klaas',0,6.0 0)[/color]

      What happens when you type (or copy/paste) the SQL command into the
      "Query Analyser" (or whatever it is called) window and execute it?

      --
      Mail to my "From:" address is readable by all at http://www.dodgeit.com/
      == ** ## !! ------------------------------------------------ !! ## ** ==
      TEXT-ONLY mail to the whole "Reply-To:" address ("My Name" <my@address>)
      may bypass my spam filter. If it does, I may reply from another address!

      Comment

      Working...