Click here to Skip to main content
15,907,910 members
Home / Discussions / Database
   

Database

 
GeneralRe: xml sql Pin
Mycroft Holmes1-Mar-10 18:10
professionalMycroft Holmes1-Mar-10 18:10 
AnswerRe: xml sql Pin
Not Active25-Feb-10 14:15
mentorNot Active25-Feb-10 14:15 
QuestionSQL Server re-installs when already installed Pin
Rich Leyshon25-Feb-10 8:17
Rich Leyshon25-Feb-10 8:17 
AnswerRe: SQL Server re-installs when already installed Pin
Mycroft Holmes25-Feb-10 10:54
professionalMycroft Holmes25-Feb-10 10:54 
QuestionSQL Server Exported Text File Differences Pin
Member 450523625-Feb-10 3:18
Member 450523625-Feb-10 3:18 
QuestionQuery / Design Optimization help Pin
Laddie24-Feb-10 20:05
Laddie24-Feb-10 20:05 
AnswerRe: Query / Design Optimization help Pin
Chris Meech25-Feb-10 7:00
Chris Meech25-Feb-10 7:00 
QuestionExcel to SQL Pin
MAW3024-Feb-10 15:33
MAW3024-Feb-10 15:33 
I received the following error (see line *********error***********) when trying to transfer data from excel to sql using the code below. The sql table is in the database and columns all match the store procedure, does anyone have any idea what creates this problem.

Thanks in advance, Michael


Failed to obtain column collation information for the destination table. If the table is not in the current database the name must be qualified using the database name (e.g. [mydb]..[mytable](e.g. [mydb]..[mytable]); this also applies to temporary-tables (e.g. #mytable would be specified as tempdb..#mytable).

void ExcelToSqlBulkCopy(String strPath, String strFile, String strTableName)
{
strExcelStoredProcedure = "SELECT ID,City,State FROM [Cities$]";
String excelConnectionString = y;
String sqlConnectionString = z;

// Create Connection to Excel Workbook
using (OleDbConnection connection = new OleDbConnection(excelConnectionString))
{
OleDbCommand command = new OleDbCommand(strExcelStoredProcedure, connection);
connection.Open();

// Create DbDataReader to Data Worksheet
using (DbDataReader dr = command.ExecuteReader())
{
// Bulk Copy to SQL Server
using (SqlBulkCopy bulkCopy = new SqlBulkCopy(sqlConnectionString))
{
bulkCopy.DestinationTableName = "[MyDatabase].[dbo].[" + strTableName + "]";
bulkCopy.WriteToServer(dr); *********error***********
}
}
connection.Close();
}
}
AnswerRe: Excel to SQL Pin
WoutL24-Feb-10 19:54
WoutL24-Feb-10 19:54 
AnswerRe: Excel to SQL Pin
hans vogels29-Aug-10 9:21
hans vogels29-Aug-10 9:21 
QuestionCase-Sensative Password Column in SQL Anywhere 10 Pin
MWRivera24-Feb-10 5:59
MWRivera24-Feb-10 5:59 
AnswerRe: Case-Sensative Password Column in SQL Anywhere 10 Pin
David Skelly24-Feb-10 6:23
David Skelly24-Feb-10 6:23 
AnswerRe: Case-Sensative Password Column in SQL Anywhere 10 Pin
PIEBALDconsult24-Feb-10 9:20
mvePIEBALDconsult24-Feb-10 9:20 
GeneralRe: Case-Sensative Password Column in SQL Anywhere 10 Pin
MWRivera24-Feb-10 9:24
MWRivera24-Feb-10 9:24 
GeneralRe: Case-Sensative Password Column in SQL Anywhere 10 Pin
PIEBALDconsult24-Feb-10 14:19
mvePIEBALDconsult24-Feb-10 14:19 
GeneralRe: Case-Sensative Password Column in SQL Anywhere 10 Pin
WoutL24-Feb-10 10:28
WoutL24-Feb-10 10:28 
GeneralRe: Case-Sensative Password Column in SQL Anywhere 10 Pin
PIEBALDconsult24-Feb-10 14:10
mvePIEBALDconsult24-Feb-10 14:10 
GeneralRe: Case-Sensative Password Column in SQL Anywhere 10 Pin
WoutL24-Feb-10 19:50
WoutL24-Feb-10 19:50 
GeneralRe: Case-Sensative Password Column in SQL Anywhere 10 Pin
David Skelly24-Feb-10 22:46
David Skelly24-Feb-10 22:46 
GeneralRe: Case-Sensative Password Column in SQL Anywhere 10 Pin
MWRivera25-Feb-10 3:51
MWRivera25-Feb-10 3:51 
GeneralRe: Case-Sensative Password Column in SQL Anywhere 10 Pin
David Skelly25-Feb-10 6:14
David Skelly25-Feb-10 6:14 
GeneralRe: Case-Sensative Password Column in SQL Anywhere 10 Pin
MWRivera25-Feb-10 6:27
MWRivera25-Feb-10 6:27 
GeneralRe: Case-Sensative Password Column in SQL Anywhere 10 Pin
MWRivera3-Mar-10 4:37
MWRivera3-Mar-10 4:37 
QuestionOracle Primary key Pin
MsmVc24-Feb-10 0:01
MsmVc24-Feb-10 0:01 
AnswerRe: Oracle Primary key Pin
Mycroft Holmes24-Feb-10 0:50
professionalMycroft Holmes24-Feb-10 0:50 

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.