15,743,541 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View Javascript questions
View C++ questions
View Python questions
View Java questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Daniel Miller (Top 7 by date)
Daniel Miller
12-Dec-15 15:15pm
View
Reason for my vote of 5 \n This is a very thorough list of useful tools - thanks!
Daniel Miller
21-Oct-15 10:05am
View
To confirm then, you are no longer getting an error, and the tables in SQL Server are successfully created and loaded from Access, but the primary key column in the new tables does not have the Identity property enabled - is that correct?
If so, then this is a resource you might want to check:
http://blog.sqlauthority.com/2009/05/03/sql-server-add-or-remove-identity-property-on-column/
Daniel Miller
20-Oct-15 10:33am
View
You don't need to create the destination tables, and you don't need to worry about setting IDENTITY_INSERT in your stored procedure.
"SELECT * INTO" will create the table and correctly load your data from the source tables.
I don't know what error you are getting, but I think you should remove "SET IDENTITY_INSERT '+@table1+' ON;" from the code in your stored procedure because that is the most likely source for an error.
Daniel Miller
19-Oct-15 13:21pm
View
Thanks, I appreciate it. I have been 'lurking' on the CodeProject site for years because it's such a great resource, and recently I decided I ought to begin contributing something back to it, so I am working to develop and improve a reputation in the community here.
Daniel Miller
19-Oct-15 12:42pm
View
Fair enough - point taken.
Daniel Miller
19-Oct-15 12:28pm
View
Well, yes, obviously you would use a parameterized query in a live system. How to do this was not the question being asked, and my solution was intended to illustrate a specific answer to a specific question as simply as possible. Rather than criticize, perhaps you could have posted a helpful amendment like this:
var select = "SELECT HASHBYTES('MD5', ChunkData) FROM dbo.x where Id = @ID";
var parameter = new SqlParameter("ID", 40);
var query = context.Database.SqlQuery<byte[]>(select, parameter);
var buffer = query.FirstOrDefault();
Daniel Miller
18-Oct-15 19:27pm
View
Sorry my answer was not more helpful. Your question was tagged "SQL" so I thought you were looking for SQL code.
What programming language are you using?
Where are your identifier values stored? In a database or a text file?
How does your code know what identifier values have been generated previously, so that you don't generate any duplicate values?
Show More