Click here to Skip to main content
15,899,313 members
Home / Discussions / Database
   

Database

 
GeneralRe: SQL Select Where query Pin
Eddy Vluggen16-Oct-12 23:37
professionalEddy Vluggen16-Oct-12 23:37 
GeneralRe: SQL Select Where query Pin
Member 952116716-Oct-12 22:41
Member 952116716-Oct-12 22:41 
GeneralRe: SQL Select Where query Pin
Simon_Whale16-Oct-12 22:52
Simon_Whale16-Oct-12 22:52 
GeneralRe: SQL Select Where query Pin
Rohit Shrivastava18-Oct-12 7:56
Rohit Shrivastava18-Oct-12 7:56 
GeneralRe: SQL Select Where query Pin
Joe Stansfield15-Oct-12 1:20
Joe Stansfield15-Oct-12 1:20 
GeneralRe: SQL Select Where query Pin
Eddy Vluggen15-Oct-12 1:25
professionalEddy Vluggen15-Oct-12 1:25 
AnswerRe: SQL Select Where query Pin
Nidhisha Biju15-Oct-12 1:05
Nidhisha Biju15-Oct-12 1:05 
GeneralRe: SQL Select Where query Pin
Eddy Vluggen15-Oct-12 1:26
professionalEddy Vluggen15-Oct-12 1:26 
AnswerRe: SQL Select Where query Pin
Aadhar Joshi16-Oct-12 20:47
Aadhar Joshi16-Oct-12 20:47 
AnswerRe: SQL Select Where query Pin
Hitesh R23-Oct-12 1:06
Hitesh R23-Oct-12 1:06 
QuestionMS SQL didn't allow to store apostrophe( ' ) in name Pin
Azher.Cybertech15-Oct-12 0:04
Azher.Cybertech15-Oct-12 0:04 
AnswerRe: MS SQL didn't allow to store apostrophe( ' ) in name Pin
Eddy Vluggen15-Oct-12 0:55
professionalEddy Vluggen15-Oct-12 0:55 
AnswerRe: MS SQL didn't allow to store apostrophe( ' ) in name Pin
Hitesh R23-Oct-12 1:08
Hitesh R23-Oct-12 1:08 
GeneralRe: MS SQL didn't allow to store apostrophe( ' ) in name Pin
Azher.Cybertech27-Oct-12 23:34
Azher.Cybertech27-Oct-12 23:34 
QuestionError Running SP [SOLVED] Pin
jojoba201113-Oct-12 21:53
jojoba201113-Oct-12 21:53 
AnswerRe: Error Running SP Pin
Eddy Vluggen14-Oct-12 3:06
professionalEddy Vluggen14-Oct-12 3:06 
AnswerRe: Error Running SP Pin
Richard Deeming15-Oct-12 3:38
mveRichard Deeming15-Oct-12 3:38 
QuestionRe: Error Running SP Pin
jojoba201115-Oct-12 4:52
jojoba201115-Oct-12 4:52 
NewsRe: Error Running SP [Solved] Pin
jojoba20115-Nov-12 22:37
jojoba20115-Nov-12 22:37 
QuestionBug in SQLBulkCopy? Truncates decimal digits after 26 records Pin
Allan Watkins12-Oct-12 14:25
Allan Watkins12-Oct-12 14:25 
AnswerRe: Bug in SQLBulkCopy? Truncates decimal digits after 26 records Pin
jschell13-Oct-12 11:05
jschell13-Oct-12 11:05 
GeneralRe: Bug in SQLBulkCopy? Truncates decimal digits after 26 records Pin
Allan Watkins13-Oct-12 13:02
Allan Watkins13-Oct-12 13:02 
Re: the numbers
The test only had a single column although I first noticed the behavior with 100 columns. Each row only has 1 value (zero) until the 27th row which is the decimal number, i.e.
0
0
0
...
0
1.23456

Re: other questions
1) The destination was SQL Server 2008 and the SQLBulkCopy came from the .Net 4.5 library. This brings up the question "Is the SQLBulkCopy the culprit or the destination SQL Server instance?"
2) Example data: see above
3) Relevant code
C#
using (SqlConnection connection = new SqlConnection(strConn))
{
    connection.Open();

    using (SqlBulkCopy bulkCopy = new SqlBulkCopy(connection))
    {
        bulkCopy.DestinationTableName = strSQL_table_name;
        bulkCopy.BatchSize = GetBulkCopySize();
        bulkCopy.BulkCopyTimeout = 2000;
        bulkCopy.NotifyAfter = GetNotifyAfter();
        bulkCopy.SqlRowsCopied += new SqlRowsCopiedEventHandler(OnSqlRowsCopied);

        try
        {
            bulkCopy.WriteToServer(results);
        }
        catch (Exception ex)
        {
            string error = ex.Message;
            MessageBox.Show("Error(CSV_To_SQL-a): " + ex.Message);
            return;
        }




4) single column in a table, name="BigNumeric", data type="numeric(18,5)
GeneralRe: Bug in SQLBulkCopy? Truncates decimal digits after 26 records Pin
jschell14-Oct-12 6:51
jschell14-Oct-12 6:51 
GeneralRe: Bug in SQLBulkCopy? Truncates decimal digits after 26 records Pin
Mycroft Holmes14-Oct-12 15:06
professionalMycroft Holmes14-Oct-12 15:06 
GeneralRe: Bug in SQLBulkCopy? Truncates decimal digits after 26 records Pin
Allan Watkins14-Oct-12 19:36
Allan Watkins14-Oct-12 19:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.