Ask a Question related to Coldfusion Database Access, Design and Development.
-
KevCB #1
Can't insert into SQL Server
Hi,
I've been having a problem with this for a while.
It seems that I cannot insert records into a table in SQL Server, and this
happens using either insert method (SQL cfquery insert and cfinsert tag).
But when running through the example PDF files using the Compass Travel access
file, I can insert into that perfectly fine.
Does anyone know why I may not be able to insert into an SQL Server table.
I've tried 2000 & 2005 with no luck.
KevCB Guest
-
500 NULL error on DB Insert (SQL Server)
I am getting a "500 NULL" error when inserting a large textfile into a "Text" column in SQL Server. I am running MX 7.0.1 on Windows 2000 Server... -
Insert date to SQL server creates error
Hi All, Thanks in Advance! I am attempting to insert a date into a SQL 2000 datetime field from an asp form. The problem that I am encountering... -
can't insert dates in SQL Server 2000
Perhaps that's because what you're actually converting is 31 divided by 7 divided by 2003 instead of the string '31/07/2003'. Ray at home --... -
Server behavior ' insert record'
Every time I use this server behavior there comes a red '!' in front of it ?? Does someone know why this happens ?? Thanks a lot Georges J.S. -
Have server get value for column on Insert?
Consider: CREATE TABLE Transactions ( TransactionGUID uniqueidentifier, TransactionNumber int, TransactionDate, SessionGUID, ...) CREATE... -
Dan Bracuk #2
Re: Can't insert into SQL Server
Originally posted by: KevCB
Hi,
I've been having a problem with this for a while.
It seems that I cannot insert records into a table in SQL Server, and this
happens using either insert method (SQL cfquery insert and cfinsert tag).
But when running through the example PDF files using the Compass Travel access
file, I can insert into that perfectly fine.
Does anyone know why I may not be able to insert into an SQL Server table.
I've tried 2000 & 2005 with no luck.
Also I know that the datasources are OK, as I can create select queries for
cfselect tags.
What happens when you try?
Dan Bracuk Guest
-
Musella #3
Re: Can't insert into SQL Server
Check the permissions in SQL server manager.. you might not have the rights
to allow inserts. This happens a lot when you try to export a database from
one server then import into another.. also check in the cf admin page that it
says to allow inserts
Musella Guest
-
KevCB #4
Re: Can't insert into SQL Server
Check the permissions in SQL server manager.. you might not have the rights to
allow inserts. This happens a lot when you try to export a database from one
server then import into another.. also check in the cf admin page that it says
to allow inserts
I have looked at what you suggested, but still can't get this working.
I have looked in the CF admin and all of the SQL statements were checked
(INSERT, UPDATE, DELETE etc.).
I wasn't sure about the permissions for SQL SERVER so I did a quick GRANT ALL
to test this out, but after I submitted the page it still didn't insert into
the database.
What happens when you try?
What seems to happens after I submit is it goes to the next page, but it comes
back as blank (apart from the banner along the top). I set up some text to
output if it is inserted correctly, but this doesn't show at all.
KevCB Guest
-
Dan Bracuk #5
Re: Can't insert into SQL Server
Originally posted by: KevCB
What seems to happens after I submit is it goes to the next page, but it comes
back as blank (apart from the banner along the top). I set up some text to
output if it is inserted correctly, but this doesn't show at all.
Are you getting any errors? Sometimes they show up way at the bottom, and you
have to scroll down to see it. If not, put a simple message and cfabort after
your input query. See if your message displays. Look at your debugging info
to see if your query ran. If it did, your problem lies elsewhere.
Dan Bracuk Guest
-
KevCB #6
Re: Can't insert into SQL Server
I've managed to sort this problem out now. Thanks for your help, but it was my
mistake that was stopping it from working.
I had set up a variable to be either 'yes' or 'no'. The page is set to 'yes'
when it loads up, but I made the mistake of set the whole page to 'no' by
accident instead of another variable to check for validation on the previous
pages form.
D'oh
KevCB Guest



Reply With Quote

