Monday, February 13, 2012

The Sudden Death Error1:The server returned a non specific error when trying to get the data from the data source.check the format and the content of your query and try again.If the problem persists, contact the server administrator

From the production environment i created a template of a custom list l1(.stp file)  and then used this template to create a list in the dev machine, now the names of the sitecollection and the server in the dev machine are different than those from the prod machine ..
After i created a list based from the custom list template l1...i opened the list forms in the designer, as soon as i open the newform.aspx "BOOM" i was blinded with the vague,cryptic,horrifying Error--> "the server returned a non specific error when trying to get the data from the data source.check the format and the content of your query and try again.
If the problem persists, contact the server administrator"
I had no clue, probably even the designer did not know what exactly is wrong, but knew something is not well..After researching on it, i came to a solution in one of the forums which suggestion to change the weburl property ..so i checked the weburl property and there it was, the weburl sparkled as a twinkle in the dark..Default Value was still pointing to the production server site so i changed it to dev server site...and BINGO!..off in a flash it worked!

Below is the tag in the newform.aspx

<SharePoint:SPDataSource runat="server" DataSourceMode="ListItem" SelectCommand="&lt;View&gt;&lt;Query&gt;&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name=&quot;ContentType&quot;/&gt;&lt;Value Type=&quot;Text&quot;&gt;Item&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;&lt;/Query&gt;&lt;/View&gt;" UseInternalName="True" UseServerDataFormat="True"><SelectParameters><WebPartPages:DataFormParameter ParameterKey="ListItemId" PropertyName="ParameterValues" DefaultValue="0" Name="ListItemId"></WebPartPages:DataFormParameter><WebPartPages:DataFormParameter ParameterKey="weburl" PropertyName="ParameterValues" DefaultValue="http://site.internal.com" Name="weburl"></WebPartPages:DataFormParameter><WebPartPages:DataFormParameter ParameterKey="ListID" PropertyName="ParameterValues" DefaultValue="{40B40CDB-593E-4142-8AEA-B25032DE54D1}" Name="ListID"></WebPartPages:DataFormParameter>




No comments:

Post a Comment