Questions tagged [dbml]

For questions specifically about the linq-to-sql dbml file (structure or location) generated by SqlMetal or Visual Studio. Questions about linq-to-sql should be tagged by the [linq-to-sql] tag.

82 questions
0
votes
0 answers

Cannot open database requested by the login .Login failed for user

I have few aspx pages and and few tables in database. Each page connects to respective table. The purpose of each page is the same, only some condition are different. When I develop I use different database for testing data and called it…
Tommy
  • 108
  • 1
  • 11
0
votes
3 answers

How to install SQL Server support for Visual Studio 2017?

I am not able to connect to SQL Server .dbml file. When I am trying to connect to SQL Server, it shows a message to "install the missing package". Now, when I am installing that missing plug-in, it just shows the progress bar and at last shows…
Merbin Joe
  • 121
  • 1
  • 15
0
votes
0 answers

Update dbml SQL Server Compact files

I'm working on a project that I did not initially do. I have created a new table in a SQL Server Compact database (DbRecipes). In the Visual Studio 2010 solution, I have the DbRecipes.dbml Linq-to-SQL model file with the self-produced…
fede186
  • 89
  • 8
0
votes
1 answer

Define column class when data is impoted using RJDBC in R

I am trying to import a very large data set from a HANA database in R. One of the problems of the RJDBC package is that all columns with characters are loaded as character column type. In our case loading the column as a factor would be much more…
Tobias Dekker
  • 980
  • 8
  • 19
0
votes
1 answer

Server - Client application and shared Linq to SQL generated classes

I'm working on a client-server application where server is running as REST service and is connected to SQL server. Classes are generated automatically from *.dbml file (LINQ->SQL). My question is: Should I create new classes for data exchange…
Josef
  • 43
  • 7
0
votes
1 answer

How dbml should be written when a stored procedure returns multiple result sets?

Is there any way to also modify dbml so that the method in designer.cs stays as IMultipleResults? I have a stored procedure that returns 2 sets of data. When I drag & drop the procedure to dbml, xml and designer.cs generated by dbml
HMan
  • 11
  • 6
0
votes
2 answers

DBML DataClasses constructor: 'object' does not contain a constructor that takes 1 arguments

I've found a million examples of how this is supposed to work, but I can't figure out why it doesn't recognize the class properly, as if it weren't marked "partial". Here's my partial class to allow me to define my DB connection string in a config…
0
votes
3 answers

LINQ to SQL (DBML) update entity from different data context

I'm trying to update Entity/model using LINQ to SQL (DBML). but I'm not able to do it. Here is my code snippet. public void Update(Customer customer) { using (MyDataContext db = new MyDataContext()) { db.Customers.Attach(customer,…
Saadi
  • 2,211
  • 4
  • 21
  • 50
0
votes
1 answer

DBML to SQL script?

Initially I created database tables and generated DBML class file using Database. (LINQ). But due to system crash, I lost my database instance ( around 20 tables ) and I want to get it back. ( atlest schema ) Is there any tool/ way to generate SQL …
user3538382
  • 11
  • 1
  • 3
0
votes
2 answers

Get record for each type with latest / bigger dates in C# DBML

I have a DB table which has some data as follows: LINE | QTY | USERID | DATE ----------------------------------------- 1 | 5 | qb1 | 2015-03-02 11:23:25 2 | 1 | qb2 | 2015-03-02 18:24:03 3 | 3 | ch1 | 2015-03-03 05:38:49 1…
progrAmmar
  • 2,606
  • 4
  • 29
  • 58
0
votes
2 answers

Reference class property in app.config?

Me and a collegue of mine are working on an application that connects to a database, using LINQ(and subsequently DBML files). Each one of us has their own connection string in order to work on the own database like so: public class DbConfig { …
SpirosMesa
  • 69
  • 1
  • 1
  • 10
0
votes
1 answer

Data.linq context, Invalid column name

I updated my dbml file after adding a new column to the database table in DEV. Everything works in DEV environment. But when deployed to test and production I get this Invalid Column Name exception. Any suggestions? var CreateUpdateCtx = new…
bahramzy
  • 133
  • 3
  • 14
0
votes
1 answer

Linq To Sql, Extended Delete of an Entity wont let it delete anymore

I have 2 entities, for example Parent and Child. what I'm trying to achieve here is to have Delete method of entity Child extended so i can do some stuff when it is Deleting, here is what i have done so far: partial class MyDataClassDataContext { …
0
votes
0 answers

Updating DBML in Visual Studio 2015

Up to know I've used Huagati DBML/EDMX Tools, but it's not working in VS 2015. How can I update dbml automatically not by drag and drop tables/views again?
Okan Kocyigit
  • 13,203
  • 18
  • 70
  • 129
0
votes
1 answer

refreshing generated code from dbml

I've added two new tables to the database. I've dropped them on the design surface. My understanding is that it should just automatically generate the design.cs code as a result. It did, according to my faulty memory, when I added a new table last…
BWhite
  • 713
  • 1
  • 7
  • 24