ASP SQLSERVER PROB:

ASP SQLSERVER PROB:

am 01.10.2004 15:06:38 von Anthony Judd

When i try to insert a record into a table 'account' i keep getting this
error..

Microsoft OLE DB Provider for SQL Server (0x80040E37)
Invalid object name 'account'.

It doesn't occur when i issue the select statement..results are returned.

cst = "Provider=SQLOLEDB;Data Source=127.0.0.1;Initial
Catalog=essential_health;Network=DBMSSOCN; User
Id=administrator;Password=password"
set cn = CreateObject("ADODB.Connection")
cn.open cst

Set rs = cn.execute("select * from account")
Response.Write("Account: " & rs("account_name") & " Password: " &
rs("account_password"))
cn.execute("insert into account ('account_name','account_password') VALUES
('administrator','essential')")

Help appreciated!!
AJ

Re: ASP SQLSERVER PROB:

am 01.10.2004 15:16:30 von Anthony Judd

Don't worry i sorted this out!

Re: ASP SQLSERVER PROB:

am 01.10.2004 22:46:56 von mkamath

Could you please post the solution for the benefit of the group? :)

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com


"Anthony Judd" wrote in message
news:eu3Hgj7pEHA.2696@TK2MSFTNGP15.phx.gbl...
> Don't worry i sorted this out!
>
>
>

Re: ASP SQLSERVER PROB:

am 01.10.2004 22:55:27 von reb01501

He needed to remove the quotes from the colymn names in his Insert
statement.

Bob Barrows
Manohar Kamath wrote:
> Could you please post the solution for the benefit of the group? :)
>
>
> "Anthony Judd" wrote in message
> news:eu3Hgj7pEHA.2696@TK2MSFTNGP15.phx.gbl...
>> Don't worry i sorted this out!

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: ASP SQLSERVER PROB:

am 02.10.2004 01:02:30 von Anthony Judd

Exactly... a momentary lapse of intelligence!!

Re: ASP SQLSERVER PROB:

am 18.01.2005 08:49:44 von Bullschmidt

Perhaps try brackets and see if that helps by changing this:
cn.execute("insert into account...

To be more like this instead:
cn.execute("insert into [account]...

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!