Click here to Skip to main content
15,900,906 members
Home / Discussions / Database
   

Database

 
GeneralRe: SQL Linq, concepts of writing queries Pin
jkirkerx8-Jul-15 12:32
professionaljkirkerx8-Jul-15 12:32 
Questionssrs rendering format ppt pptx Pin
Aurelkb5-Jul-15 23:35
Aurelkb5-Jul-15 23:35 
AnswerRe: ssrs rendering format ppt pptx Pin
Richard MacCutchan6-Jul-15 0:13
mveRichard MacCutchan6-Jul-15 0:13 
QuestionEvaluate returnvalues of stored procedures used in TableAdapterManager.UpdateAll Pin
atrus27113-Jul-15 1:49
atrus27113-Jul-15 1:49 
AnswerRe: Evaluate returnvalues of stored procedures used in TableAdapterManager.UpdateAll Pin
atrus27113-Jul-15 2:39
atrus27113-Jul-15 2:39 
QuestionOracle Query Builder Pin
Mycroft Holmes30-Jun-15 14:18
professionalMycroft Holmes30-Jun-15 14:18 
AnswerRe: Oracle Query Builder Pin
Jörgen Andersson7-Jul-15 8:40
professionalJörgen Andersson7-Jul-15 8:40 
QuestionEntity Framework 6.0.3 problem Pin
Mark Miller24-Jun-15 10:42
Mark Miller24-Jun-15 10:42 
I have an C# Windows Forms application (let's call it "APP-A") that I use on a weekly basis. I've been using APP-A for a while and recently needed to add the ability to store data into a MS-SQL database.

So I added EntityFramework 6.1.3 to my project (using NuGet) and using Code First, I quickly added my model classes and a dbcontext class, targeting my local SQLEXPRESS instance.

All works, life is good, the data I need to store is in the DB, success!

Next, I needed to move my SQL DB to one of our MSSQL servers, so I changed the connection string in App.config and ran the application, expecting the DB would be created on the server.

The DB was not created so I manually created the DB on the server, then ran the application and it won't connect to the server DB. I then changed the connection string back to point to my local SQLEXPRESS, and the application again works perfectly.

Frustrated, I created a brand new C# console app (lets call it "APP-B") and added EF 6.1.3 to it, then copied my models and dbcontext classes and connection string from APP-A to APP-B and attempted to connect to the DB on the server, which APP-B did without a problem.

I then deleted the DB from the server, re-ran APP-B and the database was recreated correctly on the server.

I changed APP-B connection string to point to my local SQLEXPRESS and it connected to the local DB fine, then I changed the APP-B connection string to point at the server and it again works fine.

So now I have two projects, APP-A which will connect to my local SQLEXPRESS but not the server, and APP-B which can access BOTH the server DB and the local SQLEXPRESS DB.

I cannot emphasize this enough: both APP-A and APP-B contain the same models and dbcontext classes as well as the same connection strings.

Today I removed and reinstalled EF 6.1.3 from APP-A and I still get the same results - APP-A can access the local SQLEXPRESS DB, but not the server DB.

Has anyone ever seen this behavior before?
Sincerely,

-Mark
mamiller@rhsnet.org


modified 25-Jun-15 15:53pm.

AnswerRe: Entity Framework 6.0.3 problem Pin
Mark Miller1-Jul-15 9:49
Mark Miller1-Jul-15 9:49 
Questionstop accessing peoples SQL server through SQL management Studio. Pin
Azam Niaz Ch.21-Jun-15 9:06
Azam Niaz Ch.21-Jun-15 9:06 
AnswerRe: stop accessing peoples SQL server through SQL management Studio. Pin
PIEBALDconsult21-Jun-15 9:24
mvePIEBALDconsult21-Jun-15 9:24 
GeneralRe: stop accessing peoples SQL server through SQL management Studio. Pin
Azam Niaz Ch.21-Jun-15 18:21
Azam Niaz Ch.21-Jun-15 18:21 
GeneralRe: stop accessing peoples SQL server through SQL management Studio. Pin
PIEBALDconsult21-Jun-15 18:28
mvePIEBALDconsult21-Jun-15 18:28 
GeneralRe: stop accessing peoples SQL server through SQL management Studio. Pin
scottgp22-Jun-15 1:19
professionalscottgp22-Jun-15 1:19 
GeneralRe: stop accessing peoples SQL server through SQL management Studio. Pin
Eddy Vluggen22-Jun-15 1:36
professionalEddy Vluggen22-Jun-15 1:36 
AnswerRe: stop accessing peoples SQL server through SQL management Studio. Pin
Mycroft Holmes21-Jun-15 19:57
professionalMycroft Holmes21-Jun-15 19:57 
AnswerRe: stop accessing peoples SQL server through SQL management Studio. Pin
GuyThiebaut21-Jun-15 21:24
professionalGuyThiebaut21-Jun-15 21:24 
GeneralRe: stop accessing peoples SQL server through SQL management Studio. Pin
Mycroft Holmes22-Jun-15 14:13
professionalMycroft Holmes22-Jun-15 14:13 
QuestionMaximum stored procedure, function, trigger, or view nesting level exceeded (limit 32) Pin
indian14319-Jun-15 15:46
indian14319-Jun-15 15:46 
AnswerRe: Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32) Pin
Richard Deeming22-Jun-15 1:41
mveRichard Deeming22-Jun-15 1:41 
GeneralRe: Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32) Pin
indian14322-Jun-15 7:00
indian14322-Jun-15 7:00 
QuestionHow to add primary key in existing table? Pin
apple blue16-Jun-15 16:53
apple blue16-Jun-15 16:53 
AnswerRe: How to add primary key in existing table? Pin
Peter Leow16-Jun-15 17:07
professionalPeter Leow16-Jun-15 17:07 
GeneralRe: How to add primary key in existing table? Pin
apple blue16-Jun-15 18:37
apple blue16-Jun-15 18:37 
AnswerRe: How to add primary key in existing table? Pin
Dhamodharan A18-Jun-15 21:33
Dhamodharan A18-Jun-15 21:33 

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.