16,015,658 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 C++ questions
View Javascript questions
View Visual Basic questions
View .NET 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 Heino Zunzer (Top 16 by date)
Heino Zunzer
25-Jan-12 6:02am
View
have you tried any of these statements? Not one of them works!
Heino Zunzer
23-Jan-12 11:08am
View
You do realise that both above queries only work with the specific data you have entered?
Try changing the data to
id action value
1 BEGIN 9
1 END 16
2 BEGIN 20
2 END 25
1 BEGIN 10
1 END 15
and you'll see that you still have no solution, since the main problem is the same ID for lines 1, 2, 5 and 6.
Heino Zunzer
23-Jan-12 7:09am
View
with
SET IDENTITY_INSERT books ON
you can insert any number into an autoincrement (identity) field. after you have done your inserts
SET IDENTITY_INSERT books OFF
will switch the autoincrement on again.
Using identity columns is always best practise. Using GUIDS worst practise. GUIDS are basically char columns and joining and searching on GUIDs takes much longer than on integer columns. also GUIDs are random and not in ascending order, which a primary key, espescially a clustered one, always should be.
and don't even get me started on the idea with creating a new table. just set identity_insert on and insert your values. as easy as that.
Heino Zunzer
19-Jan-12 12:24pm
View
You can either use sqlcmd command line tool (http://msdn.microsoft.com/en-us/library/ms162773.aspx) or use the same method you are using in your code to connect to the Sql Server.
Heino Zunzer
23-Nov-11 12:22pm
View
even easier. the @nums part is only to get the things into a temporary table. if it already is a table or a query result, forget the first part.
declare @tabNums table (Num int primary key clustered not null)
insert @tabNums (Num)
select yourNumColumn
from yourTable;
and then go on with the cursor (from -- now check for holes in the chain)
Heino Zunzer
23-Nov-11 12:17pm
View
Correct. Just in addition:
To get the scripts, right click the database in Management Studio, select > Tasks, then select > Generate Scripts.
There you can choose all objects for which you want to generate scripts.
Then you can run these scripts on SQL 2008 Express and even SQL 2005 (if you are not using any advanced features as mentioned above)
Heino Zunzer
21-Nov-11 12:20pm
View
with
set identity_insert table1 on
you switched identity insert on, which means, you want to give the identity column explicit values. in this case you must provide the column name Id and values for that column.
What you actually want is
set identity_insert table1 off
then your insert statement above should work just fine.
Heino Zunzer
11-Nov-11 14:35pm
View
gibberish? what is your question?
Heino Zunzer
11-Nov-11 14:34pm
View
Please specify structure of your tables and your data.
With this little information any answer given will only lead to more questions.
Heino Zunzer
11-Nov-11 6:07am
View
Oh, and if you mean to have a table with fields from various different linked tables: that's not possible.
You will have to link all the tables you need and then create a view, that displays the fields you want.
Heino Zunzer
11-Nov-11 6:05am
View
In Access 2002 go to Tools -> Database Utilities -> Linked Table Manager.
There you can refresh as many linked tables as you like.
Heino Zunzer
11-Nov-11 6:01am
View
Please ensure that you understand, what you are doing. Don't execute blindly code you copy off the internet. Google the tools at least and see what the parameters mean.
http://msdn.microsoft.com/en-us/library/ms162773.aspx
In this case of course you need to provide a proper server name. -S is the parameter for the sql server instance name, and I doubt your SQL Server is called "A". It will be something like "localhost" or "srv-blablasql".
-U stands for user. (btw, "sa" is the sql sys admin user. you sure he has password "sa". If so, fire your DBA).
-P is for password.
-Q is for Query
and sqlcmd has many more possible parameters, just look at the link.
Heino Zunzer
11-Nov-11 5:54am
View
What version of Access are you using?
In Access 2010, go to the External Data ribbon, second symbol from the left is 'Linked Table Manager'. There you can refresh the tables.
in Access 2007 go to the External Data ribbon, then right click on your table and choose Linked Table Manager from the Context menu.
http://www.techonthenet.com/access/tables/refresh_links2007.php
Heino Zunzer
11-Nov-11 4:47am
View
It's not a solution, it's an explanation.
Because I don't know, what your problem is.
THE DATES ARE IN THE CORRECT ORDER!
1/10/2011 12:00:00 AM -> Jan. 10
1/11/2011 12:00:00 AM -> Jan. 11
2/10/2011 12:00:00 AM -> Feb. 10
2/11/2011 12:00:00 AM -> Feb. 11
3/10/2011 12:00:00 AM -> Mar. 10
3/11/2011 12:00:00 AM -> Mar. 11
How else would you want them sorted?
Do you want them displayed in another format? DD/MM/YYYY?
Please state what output you do expect. Then I can (maybe) tell you, how to get there. but sorting is not your problem.
Heino Zunzer
10-Nov-11 13:35pm
View
erm, yes, because it is not SQL Query Analyzer syntax... its syntax for a batch
file.
sqlcmd is a command line tool to execute SQL Server commands from the command line.
Copy the above code to notepad.exe, save as Backup.bat and run backup.bat from a command prompt.
Heino Zunzer
10-Nov-11 6:33am
View
yes, and what's your concern with that? That is the correct order.
the Format here is YYY-MM-DD
let me translate:
2011-01-10 = January 10, 2011
2011-02-10 = February 10, 2011
2011-03-10 = March 10, 2011
The format in your original post was MM/DD/YYYY (US format)
So you see, the order is correct.
Show More