G
Guest
Hi all,
I've created a new project to test ObjectDataSource component.
I've just added a new objectdatasource, configured it (linked to a table)
etc ...
It works fine on localhost, i can create, retrieve, update and delete data.
My problem occurs when I publish this sample on my production server.
I've created the same table (EXACTLY THE SAME), changed connection strings
and all I need.
When I run my page with the detailsview and the objectdatasource, I can see
all records in the database (connection to the database is OK). I can also
delete records.
When I try to create or update a new record, I receive the following error
(I cqn fill my fields but when I press insert or update the problem occurs):
Disallowed implicit conversion from data type sql_variant to data type
varchar, table 'hervdb.sokette.Video', column 'description'. Use the CONVERT
function to run this query.
Disallowed implicit conversion from data type sql_variant to data type
varchar, table 'hervdb.sokette.Video', column 'url'. Use the CONVERT function
to run this query.
Disallowed implicit conversion from data type sql_variant to data type
datetime, table 'hervdb.sokette.Video', column 'date'. Use the CONVERT
function to run this query.
A line for each field in fact.
My objectdatasource looks like this :
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
DeleteMethod="DeleteVideo"
InsertMethod="AddVideo" OldValuesParameterFormatString="original_{0}"
SelectMethod="GetVideo"
TypeName="VideoBLL" UpdateMethod="UpdateVideo">
<DeleteParameters>
<asp
arameter Name="id" Type="Int32" />
<asp
arameter Name="original_id" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp
arameter Name="description" Type="String" />
<asp
arameter Name="url" Type="String" />
<asp
arameter Name="date" Type="DateTime" />
<asp
arameter Name="original_id" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp
arameter Name="description" Type="String" />
<asp
arameter Name="url" Type="String" />
<asp
arameter Name="date" Type="DateTime" />
</InsertParameters>
</asp:ObjectDataSource>
I've tried with a few differents tables, always the same problem :s
The problem probably occurs because I don'y use the same table in
production and test but I can't access production database during development.
Don't hesitate to ask more information,
Thanks,
Denis Sohet
I've created a new project to test ObjectDataSource component.
I've just added a new objectdatasource, configured it (linked to a table)
etc ...
It works fine on localhost, i can create, retrieve, update and delete data.
My problem occurs when I publish this sample on my production server.
I've created the same table (EXACTLY THE SAME), changed connection strings
and all I need.
When I run my page with the detailsview and the objectdatasource, I can see
all records in the database (connection to the database is OK). I can also
delete records.
When I try to create or update a new record, I receive the following error
(I cqn fill my fields but when I press insert or update the problem occurs):
Disallowed implicit conversion from data type sql_variant to data type
varchar, table 'hervdb.sokette.Video', column 'description'. Use the CONVERT
function to run this query.
Disallowed implicit conversion from data type sql_variant to data type
varchar, table 'hervdb.sokette.Video', column 'url'. Use the CONVERT function
to run this query.
Disallowed implicit conversion from data type sql_variant to data type
datetime, table 'hervdb.sokette.Video', column 'date'. Use the CONVERT
function to run this query.
A line for each field in fact.
My objectdatasource looks like this :
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
DeleteMethod="DeleteVideo"
InsertMethod="AddVideo" OldValuesParameterFormatString="original_{0}"
SelectMethod="GetVideo"
TypeName="VideoBLL" UpdateMethod="UpdateVideo">
<DeleteParameters>
<asp
<asp
</DeleteParameters>
<UpdateParameters>
<asp
<asp
<asp
<asp
</UpdateParameters>
<InsertParameters>
<asp
<asp
<asp
</InsertParameters>
</asp:ObjectDataSource>
I've tried with a few differents tables, always the same problem :s
The problem probably occurs because I don'y use the same table in
production and test but I can't access production database during development.
Don't hesitate to ask more information,
Thanks,
Denis Sohet