Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 News Management
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

psalesses
New Member

50 Posts

Posted - 23 August 2001 :  17:44:19  Show Profile
Hey, I am trying to write a news management application for my website. All it needs to have is 5 fields. email, author, newstype, summary, story, date, and id.

news is a table in SQL 7 database alanews

this is my code...

<%
strConnString = "driver={SQL Server};server=**.com;uid=**;pwd=**;database=alanews"
set myConn = Server.CreateObject("ADODB.Connection")
set ors = server.createobject("adodb.recordset")
MyConn.Open strConnString
ors.Open "news", MyConn, 1, 2
ors.AddNew
ors.Fields("author") = request.form("author")
ors.Fields("email") = request.form("email")
ors.Fields("date") = date()
ors.Fields("newsType") = request.form("newstype")
ors.Fields("summary") = request.form("summary")
ors.Fields("story") = request.form("story")
ors.update
'-------------------------SET COOKIE-------------------------------
ors.close
set ors = nothing
MyConn.close
set MyConn=nothing
%>

this is my error...

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]The request for procedure 'news' failed because 'news' is a table object.

/alanews/addNewsProcess.asp, line 6


Does anyone have and ideas?

Phil


Doug G
Support Moderator

USA
6493 Posts

Posted - 24 August 2001 :  02:20:59  Show Profile
Try ors.Open "news", MyConn, 1, 2 , 2

The last option is acCmdTable to specify a table type datasource.

======
Doug G
======
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.3 seconds. Powered By: Snitz Forums 2000 Version 3.4.07