|
I have rechecked and have realised that problem emanate from crystal report.
I have crystal report based report that uses Store Procedure with parameters(that includes date) as its datasource.
I realised that when computer is on US culture , the report displays but when I try to display the report in UK culture it raises exception.
I used the same Store Procedure for DataGridView in both cultures (ie US and UK) and it worked with same parameters that did not work in crystal report.
|
|
|
|
|
You have replied to wrong message(also wrong thread). Get a
thatrajaCode converters | Education Needed
No thanks, I am all stocked up. - Luc Pattyn
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
|
|
|
|
|
Message: at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at System.Data.SqlClient.SqlBulkCopy.CreateOrValidateConnection(String method) at System.Data.SqlClient.SqlBulkCopy.WriteRowSourceToServer(Int32 columnCount) at System.Data.SqlClient.SqlBulkCopy.WriteToServer(IDataReader reader) at LanUpload.BntLan_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
|
|
|
|
Are you able to show the code where the exception occurs? I think its something to do with the number of connections that you create.
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
My app runs perfectly with MSSQL Server in client/server architecture when my computer is in US culture.
But I experience problem when I switched my computer to UK culture. My investigation revealed that it is the date fields in the test data which I created earlier in US culture that is creating the problem
My MSSQL Server collation is Latin1_General_CS_AI.
I want my app to allow for culture transparency at least for US and UK.
modified 11-Dec-13 19:52pm.
|
|
|
|
|
It is to be hoped that you are storing dates as DATE or DATETIME, not as strings, so that should not be a problem.
If you are storing dates as string, I strongly reccommend you refactor and do it the right way.
|
|
|
|
|
Thanks for the reply.
Yes I am storing data as DATE.
|
|
|
|
|
The at some point your a converting your test data from string to date and falling in a hole. That is where you need to deal with the format. Collation is not going to help you.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
As stated collation is not the problem. Look at SET DATEFORMAT and see if it will help. Hint you can set it for the process.
|
|
|
|
|
I have rechecked and have realised that problem emanate from crystal report.
I have crystal report based report that uses Store Procedure with parameters(that includes date) as its datasource.
I realised that when computer is on US culture , the report displays but when I try to display the report in UK culture it raises exception.
I used the same Store Procedure for DataGridView in both cultures (ie US and UK) and it worked with same parameters that did not work in crystal report.
|
|
|
|
|
You might have to ask in a Crystal Reports forum.
|
|
|
|
|
thanks for suggestion djj55. I appreciate your assistance
|
|
|
|
|
Sorry I could not be of more help.
|
|
|
|
|
noblepaulaziz wrote: but when I try to display the report in UK culture it raises exception. What's that? You most of people don't include that in your question, don't know why?
thatrajaCode converters | Education Needed
No thanks, I am all stocked up. - Luc Pattyn
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
|
|
|
|
|
What is the difference between LEFT JOIN and LEFT OUTER JOIN?? i.e. what is the difference between INNER JOIN and OUTER JOIN??
I was confused with these two joins..
|
|
|
|
|
I got the answer friends. Both are same. Then why the concept of outer join came??
|
|
|
|
|
When writing a query, I like to be explicit about what is intended to do.
If I want only records with a match, they I say 'INNER JOIN'.
If I want partial matches, I say 'LEFT OUTER JOIN' or 'RIGHT OUTER JOIN' based on how I feel like writing the query, but it is usually 'RIGHT OUTER JOIN'.
Tim
|
|
|
|
|
Why cant we use left join instead of left outer join??
|
|
|
|
|
I did not write the design for whatever version of SQL is in use.
My personal preference it to be explicit in what I am doing.
If the version supports 'LEFT JOIN' and 'LEFT OUTER JOIN' and treats them the same, then use either one.
Some SQL instances use different syntax; I just like the use to be obvious to the reader.
|
|
|
|
|
|
Left Join and Left Outer Join is the same thing. It's just a matter of verbosity in the syntax
Politicians are always realistically manoeuvering for the next election. They are obsolete as fundamental problem-solvers.
Buckminster Fuller
|
|
|
|
|
ok . thanks for your reply.
|
|
|
|
|
|
Hi,
i'm implementing that using the method exposed in VB DataGridView Automatically Saving Updates to a Bound Database[^] but
how to handle exception thrown when DataAdapter.Update is called in RowValidated?
I can catch the exception with a Try but how to cancel the move to a new row and to force user to correct the edited row?
What i would obtain is a "SQL Server Management Studio-style". When you edit a row and move to another, if an exception is detected (duplicate key for example), a message is shown, the edit glyph is mantained in the edited row and cursor remain on the edited row.
Thanks
|
|
|
|
|
Before it's validated, it will be validating[^].
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|