Questions tagged [columnmappings]
28 questions
15
votes
4 answers
Skip some columns in SqlBulkCopy
I'm using SqlBulkCopy against two SQL Server 2008 with different sets of columns (going to move some data from prod server to dev). So want to skip some columns not yet existed / not yet removed.
How can I do that? Some trick with…

abatishchev
- 98,240
- 88
- 296
- 433
12
votes
1 answer
How to use SqlBulkCopyColumnMappingCollection?
I want to make one SqlBulkCopy method that I can use for all my bulk inserts by passing in specific data through the parameters.
Now I need to do mapping on some of them. I don't know how to make a SqlBulkCopyColumnMappingCollection since that was…

chobo2
- 83,322
- 195
- 530
- 832
3
votes
3 answers
Spring & Hibernate, Found bit, expected TINYINT(1) DEFAULT 0
In database: there is a field whos type is TINYINT(1) and default value is 0. And in Model it is defined as TINYINT(1) DEFAULT 0. However it gives error such as…

efirat
- 3,679
- 2
- 39
- 43
2
votes
0 answers
Why I see random folders for the delta table that I create through column mappings using databricks in azure storage container
I am working on a pyspark code that reads csv files and save that to the azure storage container using databricks.
Writing the code to read and write the csv files seems to be straight forward using reader and writer api.
As we are dealing with csv…

Nikunj Kakadiya
- 2,689
- 2
- 20
- 35
2
votes
2 answers
EF Core - Define custom column mapping strategy for all properties
By convention, each property will be set up to map to a column with the same name as the property. If I want to change the default mapping strategy, I can do it by using either Fluent API or Data Annotation. But, I want to set a custom mapping…

Tamerlan Rustambayli
- 51
- 1
- 6
2
votes
1 answer
SQL Bulk Copy by mapping columns dynamically
I read the file data into dataset and trying to bulk insert using SQL bulk copy by mapping the columns. All my column names in the database are in lower case which is created from my code.
I am not sure why I get "The specified column doesn't exist…

user1046415
- 779
- 4
- 23
- 43
2
votes
2 answers
Entity Framework Column Mapping
I have an issue with mapping an object property to a column from a database function.
The database function returns a column called [On Hand]. Therefore my model property is called OnHand.
This obviously does not map correctly and fails to retrieve…

DaRoGa
- 2,196
- 8
- 34
- 62
2
votes
0 answers
JPA issue 2 attributes mapped to same column InvalidStateException: Attempt to set column to two different values
I have the following problem,
I have the folowing classes:
class C(){
...
@ManyToOne
@JoinColumns({
@JoinColumn(name = "B_FK", referencedColumnName = "B_ID"),
@JoinColumn(name = "A_FK", referencedColumnName = "A_ID")})
…

Olli Paq
- 31
- 4
1
vote
0 answers
SQL Bulk Copy by mapping columns dynamically does not work but works manually
I am trying to do a columnMappings for a bulk insert but i cant get the Columnmapping to work in a for loop but when i do it manually it works just fine.
I get this error when trying a dynamic ColumnMapping even though it adds the ColumnMapping to…

E S
- 105
- 2
- 8
1
vote
0 answers
BIRT XML missing rows
I'm using an XML file for a Data Source that looks like this
93

1122335
- 45
- 1
- 11
1
vote
0 answers
Exception calling "WriteToServer" with "1" argument(s)
I have powershell script to insert values from an xml file into the sql database.
The issue I'm facing is that i cant seem to insert the values into the sql database, as the error states that the string value in data source is not getting converted…

B21
- 37
- 1
- 9
1
vote
2 answers
SqlBulkCopy fails on columns with spaces in them
I know that I need to wrap any column names with spaces in square brackets []. I do this when I'm building my DataTable columns.
for (int i = 0; i < columns.Count; i++)
{
string colname = columns[i].ToString();
if (colname.Contains(" "))
…

wham12
- 295
- 5
- 21
1
vote
1 answer
Phalcon models clobbered in session
I am storing a model in my session. I am using column maps in my model so that if the column name changes in the database I don't have to make changes throughout my application. So if 'firstName' changed to 'first' in the database i could keep…

John Foley
- 4,373
- 3
- 21
- 23
1
vote
0 answers
Where do I get the list of ColumnAttribute.TypeName possible values for Oracle
I'm using Entity Framework code-first. When mapping class properties to Oracle database table columns I do the following:
public class Employee{
[Column("EMPLOYEEID")]
public int EmployeeID{get;set;}
}
I've noticed that I can also specify the…

Ruslan
- 109
- 1
- 1
- 4
1
vote
1 answer
How to differentiate duplicate column names from different source tables/subqueries by alias in an SQL select statement when using SqlDataReader?
Suppose I have POCO entities being read from a database and they each have "ID" as their primary key column name.
If selecting from more than one table or subquery with aliases a and b like select a.*, b.* from a, b, then the selected columns will…

Triynko
- 18,766
- 21
- 107
- 173