[MSSQL] Invalid Insertion Types
The first is emails, it reads it a parameter because of the '@' Error 07001
The second is the Datetime... (Table type) Error 22008
I can not get the right format for it lol
I know I have to convert it but I'm not sure of the syntax and I've been googling this stuff all day...
Anyone know? These are odbc btw in php
**Edit**
Well nvm the last edit again I think I really found the reason for that 07001 error now lol
My entry has a ' in it ^_^
Just need help with the datetime now...
Re: [MSSQL]Invalid Insertion Types
trying to put the date it the database?
PHP Code:
.date('D-M-Y'). // inside the ' ' so, '".date('D-M-Y')."';
I believe, is that what you want?
Re: [MSSQL]Invalid Insertion Types
Nope ^_^
That was probably like the 3rd thing I googled =p
The date string I'm inserting is the same as a perviously made asp page for this and I still get an error. I'm thinking that asp does something with the date before it's put in there
I spent about 2 days googleing this, so I don't expect to find this on google anymore
But, trust me, I've tried pretty much every format: -'s, /'s, spaces, no, spaces, no time, with time, word dates, number dates, and a bunch of other combinations as well
For right now I just made the table a varchar and called it good.
Re: [MSSQL]Invalid Insertion Types
You could make it a variable like
PHP Code:
$date = date('D-M-Y');
And just insert the variable.
ShimmyShine
Re: [MSSQL]Invalid Insertion Types
Re: [MSSQL]Invalid Insertion Types
What code are you using to insert? How are you formatting? Did you try to convert the data into an integer and insert that - with date("u", $date) - MSSQL should be able to insert a timestamp into a datetime field.
Speaking of fields, you -did- make it a datetime field, right?
Also, post errors and queries here! There are a thousend and one reasons why it can't insert, we could speculate till infinity if you don't provide more information.
Re: [MSSQL]Invalid Insertion Types
Lol, my bad I thought I saw MYSQL not MSSQL.. Sorry bout that. Lol
ShimmyShine
Re: [MSSQL]Invalid Insertion Types
Quote:
Originally Posted by
FragFrog
What code are you using to insert? How are you formatting? Did you try to convert the data into an integer and insert that - with date("u", $date) - MSSQL should be able to insert a timestamp into a datetime field.
Speaking of fields, you -did- make it a datetime field, right?
Also, post errors and queries here! There are a thousend and one reasons why it can't insert, we could speculate till infinity if you don't provide more information.
Did you read it Frag? It looks like you didn't lol
1. I did post the error
2. I said it was a datetime field
3. I said I tried all kinds of combinations, like those used in previous asp scripts
I went ahead and changed the field to varchar now, but I'm not sure if the server will have a problem with that or not
I'll the u formatting though see if it works
It's the same insertion from the other post by me lol
**Edit**
Well turns out my funder isn't going to be paying for this coming month so no point in finishing this dam thing now lol
Although it did make me realize how incredibly stupid mssql is lol
Sad that I spent almost a week on it... then he can't own up, oh well time to finish it and release it to the masses lol