EasyCFM.COM ColdFusion Forums / MS SQL Server Related Issues / Converted to MS SQL now getting error when editing

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: Converted to MS SQL now getting error when editing

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

fun_tony
11-14-2008 @ 4:43 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 24
Joined: Mar 2003

Okay so i recently moved everything from MS Access to MS SQL. Everything was working great until I tried to edit a page I had just added into the database.

When I tried to edit I get the following error: is this MS Sql related? Please help

The following information is meant for the website developer for debugging purposes.  

Error Occurred While Processing Request  
The Primary key for table "news" was not found in the datasource "".  


This error may be caused by not specifying the table name in the format that the database server expects. (For example. Oracle Server table name must be upper case or the Server table name must be qualified in the format of "schema.table_name". For the SQL Server, the format is "databasename.username.tablename", such as in customers.dbo.orders)  
  
The error occurred in D:\INETPUB\yyy\cfadmin\news_form2.cfm: line 6

4 : <cfif EditMode>
5 :      <!--update movie-->
6 :      <cfupdate datasource="yyy_composite" tablename="news">
7 :      <cfset action="updated">
8 :           <cfelse>




This message was edited by fun_tony on 11-14-08 @ 4:46 PM

weathermanfsu
01-16-2009 @ 12:46 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 183
Joined: Apr 2004

This has nothing to do with code.  When you import an Access database into SQL, it does NOT copy primary keys for each table.  So you have to go into each table and indicate which field is the primary key.  

Also note, that memo fields do not convert correctly, so you will have to manually fix them as well.

Date functions do not work the same as they did in access, you may have some issues there as well.


Website Designed and Developed by Pablo Varando.