|
How are you inspecting the value of the column? The debugger is probably using the default .ToString method, which will not display the full value. If you use the format string "yyyy-MM-dd HH:mm:ss.fff" , you should see the full value.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Here is the the link of samples of ASP.NET's Membership, Roles, and Profile, where Displaying an Informative Message in the Face of an Invalid Login, but there has been used SQL database file, But I need as it is a MS Access Database file.
Can Anybody help please
http://www.4guysfromrolla.com/articles/050306-1.aspx[^]
|
|
|
|
|
Please don't use Access; consider SQL Server Express or SQL Server CE.
|
|
|
|
|
OK Good Suggestion, I tried and got success, Thanks
|
|
|
|
|
I am trying to pull all data from SQL Database A, Table 1 where column name is X, and the value in column X equals the value in Database B, Table 2, column name Y.
So I have 2 databases on the same server.
One named A, the other named B.
I need to get all the data from A, Table1, where the values of Column Name X are equal to the values in in Column Name Y in B, Table2, and insert/write them to a new table in Database B.
Any and all help is appreciated. My SQL writing skills are very sub par.
If the title, and the subject differ, I apologize. I am just trying to put the thought thru my head as I write.
|
|
|
|
|
This is the general gist of where I think you need to be heading:
insert into B.NewTable
select a1.*
from A.Table1 a1
join B.Table2 b2
on a1.X = b2.Y
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
a1 and b2 are columns? what is X and Y?
|
|
|
|
|
a1 and b2 are aliases for tables.
moordoom wrote: what is X and Y? They are the columns you mentioned in your question.
I think you need to read a book on sql or get some basic training, since if you cannot make sense of my answer you need to start reading.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
|
Looking at the W3 school, it shows table to table joins, not database to database joins.
Here is what I have so far... (minus the insert, and it works)
SELECT * from Table1
join Database2.Table2
on ColumnX = ColumnY
X is a Column in Database1.Table1, and Y is a Column in Database2.Table2.
This gets me my info when I run the query on Database1.
But now I want write these info into Database2.Table3 and delete what was in there before.
So would my statement then be...??
DELETE * FROM Database2.Table3
INSERT INTO Database2.Table3
SELECT * from Table1
join Database2.Table2
on ColumnX = ColumnY
|
|
|
|
|
I am not able to more than 250 records insert into table in sql server 2008 through (Asp.net upload program)
|
|
|
|
|
Is there any error message?
Is there any sample code that you can show?
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
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.
|
|
|
|