|
Sorry mate you are going to have to do the work yourself, I am willing point the way not do the work. Besides I use 2005 why would i code for 2000.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hey try this
Select IDENTITY(int,1,1) AS [Row Number], FieldName
INTO #Temp
from EMPtable
order by
FieldName DESC
SELECT *
FROM #Temp
WHERE [Row Number] = 10
hope this will help you.
Reasons are not Important but Results are Important.
Swati
|
|
|
|
|
I have a .sql file with sql statements to create tables and procedures likewise,
Now we have to use DB2(client insists) as the database,
Is there any tools or anything can convert SQLSERVER2k sql statements to DB2's?
Any help would appreciate!
|
|
|
|
|
you can use import statement,this means you can run .sql file and then and you must import .mdf file
|
|
|
|
|
I am getting the given below error when I am executing VIEW in sql server 2000.
Msg 195, Level 15, State 10, Procedure UVWCUSTOMERNAME_R171, Line 3
'RANK' is not a recognized function name.
Msg 170, Level 15, State 1, Procedure UVWCUSTOMERNAME_R171, Line 5
Line 5: Incorrect syntax near '('.
|
|
|
|
|
It is available only in sql server 2005
|
|
|
|
|
Is there any alternate way to do in sql2000?
|
|
|
|
|
I have a database "DB_01" whose table are in read only mode. I have another database "DB_02" which at present does not have any tables. I want to copy all tables along with their structure from DB_01 into DB_02. Please suggest SQL query or another mechanism by which this can be achieved.
Thanks in advance.
Ankit Jain
|
|
|
|
|
you can script out the tables, views and procs using management studio.
Use the Red-Gate sqlcompare to generate the script.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I have created database in SQL server 20005 which I have detached and kept at a secured storage place. Now after formatting my system, and fresh installation of sql server 2005, when I am attaching this database table, it is adding in read only mode. Please suggest possible method to make it full accessible for all kind of operations.
Thanks in advance,
Ankit Jain
|
|
|
|
|
I have a .NET app I've written in VS2005. On a previous project I used MySQL, and managed to put together a silent install/config bootstrapper together. The installer was made using the Bootstrap Manifest Generator[^], which has worked well for me in the past. The config part was just a .exe I wrote that ran the MySQLConfig.exe with the appropriate arguments and started the service.
On my current project, we'd like to use PostgreSQL (the licensing works out better here). However, I can't get the bootstrapper to install it for me with a test app at all. It says "Installing PostgreSQL" then moves on to install my app, but PG never gets installed. I'm trying to install using postgresql-8.3.msi as my main file, and I've added the following files as "additional" files to my bootstrap package:
postgresql-8.3-int.msi
SETUP.bat
UPGRADE.bat
vcredist_x86.exe.
The only files I would think that I would need is postgresql-8.3-int.msi and postgresql-8.3.msi. Any ideas why it won't install? Is there something I'm missing here?
Thanks,
Dybs
|
|
|
|
|
Some additional information, when I tried installing Postgres as a bootstrapper project with my app, the logfile starts with the following entries:
=== Logging started: 8/21/2008 16:09:39 ===
Action start 16:09:39: INSTALL.
Action start 16:09:39: AppSearch.
Action ended 16:09:39: AppSearch. Return value 1.
Action start 16:09:39: LaunchConditions.
Action ended 16:09:39: LaunchConditions. Return value 1.
Action start 16:09:39: ValidateProductID.
Action ended 16:09:39: ValidateProductID. Return value 1.
Action start 16:09:39: CostInitialize.
Action ended 16:09:39: CostInitialize. Return value 1.
Action start 16:09:39: FileCost.
Action ended 16:09:39: FileCost. Return value 1.
Action start 16:09:39: CostFinalize.
Action ended 16:09:39: CostFinalize. Return value 1.
Action start 16:09:39: InstallValidate.
Action ended 16:09:39: InstallValidate. Return value 1.
Action start 16:09:39: InstallInitialize.
Action ended 16:09:39: InstallInitialize. Return value 3.
Action ended 16:09:39: INSTALL. Return value 3.
Then it lists all the properties that are set for the msi install. After all the properties, the log file ends with:
MSI (s) (D4:A4) [16:09:39:515]: Product: PostgreSQL MUI Wrapper 8.3 -- Installation failed.
I haven't had much luck finding anything about "PostgreSQL MUI Wrapper 8.3" unfortunately. Any ideas? Anyone? Please?
Thanks,
Dybs
|
|
|
|
|
I mostly have things working now. I can run a silent install from the command line just fine. Turns out it helps to have eht INTERNALLAUNCH=1 property set. My other problem was the CREATESERVICEUSER=1 property had to be set (default is 0), although the documentation online said this property only applied to v8.1, and I'm trying to install 8.3.3. Here's the command line I'm using now:
Msiexec.exe /i postgresql-8.3-int.msi /qn INTERNALLAUNCH=1 ADDLOCAL=server,psql SERVICEDOMAIN="%COMPUTERNAME%" CREATESERVICEUSER=1 SERVICEACCOUNT="postgres" SERVICEPASSWORD="admin" SUPERPASSWORD="admin"
However, running the installer as a bootstrap project still isn't working. It will create the postgres user account, but it still won't create the service, and doesn't seem to make any other changes to the system. It gives me a "User account <insert gibberish="" here=""> does not exist." This doesn't really seem to make sense, though, since I'm telling it to create the user account in the first place! Any other ideas?
Thanks,
Dybs.
|
|
|
|
|
I had originally wanted some information about embedding a database into my C# desktop application. After reading some other posts, I think I may have been under an incorrect assumption. Hopefully, somebody can help clarify it for me.
The original concept I was working under was that if I embedded SQLCE into my application, it would be part of the .exe file that is created and I would be able to access that database while it is still in the .exe file (and the end-user wouldn't have any access to that database, other than through the UI).
Now, it appears that although the database itself is, indeed, embedded inside the .exe file, the only way to use the database is to write it to disk. And, if any changes are made to the database, those changes can't be written back to the database within the .exe file.
Am I correct in my "new" assumption? If I want to 'hide' the database from the user, what are my options? So far, I've come up with:
1. Using a password on the database.
2. Encrypting the database.
Are there any others that might work for me?
Thanks.
Ron
|
|
|
|
|
Hi,
SQLCE is a "full" functional database although it is meant for single user desktop applications (as local datastore). This basically means that your application contains following elements:
- application and referenced assemblies
- referenced assemblies to use SQLCE
- actual database files
Changes to the database are always persisted to database files solely by database engine (SQLCE). So the fact that you "manage" the database file(s) through a Visual Studio project, doesn't mean that these files are actually embedded into the exe, but they are only registered as part of the project and can be for example deployed using ClickOnce.
Data can be added, modified and deleted to the database while creating the application and after the deployment by the application.
Then about the security. There are several techniques concerning database protection. Passwords are perhaps the simpliest. If the user can access the data files of the database (via file system) he can use them through different tools so connection password is one way to prohibit usage.
Hope that this answers at least some of the questions,
Mika
|
|
|
|
|
The problem:
I am using Windows Vista Business SP1, Visual Studio 2008 Professional Edition SP1, .NET Framework 3.5 SP1, SQL Server 2008 Express SP1. I attached the Northwind 2000 and Pubs 2000 databases.
The Add New Data Source wizard connects to the database fine and also saves the connection string in the config file, but then it refuses to show the database objects for me to choose from.
It's really a mystery to me why this is happening, but it is stopping my development in its tracks.
Note: It may be helpful to mention I installed SQL Server 2008, and then installed VS2008, updated it to SP1, was having a problem with the SQL server services, so I then uninstalled and reinstalled SQL Server 2008.
Steps to Reproduce:
Note: Basically, I was following the Walkthrough: Creating a N-Tier Data Application[^] in the MSDN help.
1. Start with no solution open.
2. Click File, point to New, and then click Project.
3. In the New Project dialog box, in the Project Types pane, click Visual C# and in the Templates pane, click Class Library.
4. Type any random project and solution name. I was following the N-Tier Walkthrough in the Help at the time, so I named the class library project "DataEntityTier" and renamed the solution to "NTier Walkthrough."
5. Click OK. Visual Studio 2008 generates the new solution and creates the project.
6. From the File menu, add a new project to the NTierWalkthrough solution.
7. In the New Project dialog box, in the Templates pane, click Class Library.
8. Name the project DataAccessTier and click OK (again I am following the walkthrough in Help -- the name doesn't matter though).
9. The DataAccessTier project is created and added to the NTierWalkthrough solution.
10. Click DataAccessTier in Solution Explorer.
11. On the Data menu, click Show Data Sources.
12. In the Data Sources window, click Add New Data Source to start the Data Source Configuration Wizard.
13. On the Choose a Data Source Type page, click Database and then click Next.
14. On the Choose Your Data Connection page, perform one of the following actions:
15. Click the existing data connection brianhart-pc\sqlexpress.Northwind.dbo in the drop-down list, and then click Next.
- The connection string is: Data Source=BRIANHART-PC\SQLEXPRESS;Initial Catalog=Northwind;Integrated Security=True
16. Click Next on the Save the Connection String to the Application Configuration File page.
17. The wizard takes a while, all along saying "Retrieving information from the database" for a while, and then says:
An error occurred while retrieving the information from the database:
The type initializer for 'Microsoft.VisualStudio.DataDesign.SyncDesigner.SyncFacade.SyncTableConfigManager' threw an exception.
Has anyone encounted this?
Sincerely Yours,
Brian Hart
moved on Saturday, August 23, 2008 4:04 PM
|
|
|
|
|
OK, you're in the wrong forum - read the notes at the top of the forum. And then you'd probably want to go and post this on the MS support pages...
|
|
|
|
|
Thanks and apologies to all...my mistake
Sincerely Yours,
Brian Hart
|
|
|
|
|
Now this is something I don't see very often these days.
|
|
|
|
|
mistakes? by me? never! hahaha
Sincerely Yours,
Brian Hart
|
|
|
|
|
hi
I have scheduled a job on backup cluster to take backup from production server. To access my production server i have a link server. It was worked fine untill last week. Now it has failed due to 'login failed for 'NT AUTHORITY/ANONYMOUS'. Plz any one let me know the solution.
D.Willington
|
|
|
|
|
When you configured the linked server, did you setup security to use that login('NT AUTHORITY/ANONYMOUS') as a security context? If yes make sure that the password is correct and that this user has permission in the production server you are trying to access.
|
|
|
|
|
I am creating a project in .net and i have to retrieve some data from tables on the conditions:
1) A user can create multiple profiles,upto 20 in 20 different categories (The data is stored in "profiles" table)
2) There is a "project" table in which projects are stored in 20 different categories
3) project categories are same as profile categories
The problem is i want to retrieve all the projects where project categories are same as a users categories
For example:
if user A has profiles in categories x,y, and z I want to retrieve the details of projects in categories x,y, and z.
number of profiles for different users are differen someone has 2 profiles while other one has 5 profiles it can be varied
If anyone can help me in SQL Query I will be highly thankfull
|
|
|
|
|
not getting wht u exactly wants ?
sql statement for dis tables ? coz its very simple you hav to use inner joins dats it
Reasons are not Important but Results are Important
|
|
|
|
|
Let me first explain you the requirement
Table Profiles:
employeeid ------ category
-----------------------------------
a ----------- Finance
b ---------- HRD
c ---------- Sales
a ------------ HRD
a ------------ Sales
b ------------ Finance
Table Work
category --------- Title
------------------------------------------------
Finance ---------- maintaining annual accounts
HRD ------------ Recruitement of skilled employees
Sales ------------ Sales of newly launched product
Finance----------- Creating Report (Quarterly)
HRD--------------- Managing Employee's Feedback
Now if I want to find work available the result should be like:
for employee a-
Category --------- Title
---------------------------------------------
Finance ---------- maintaining annual accounts
Finance----------- Creating Report (Quarterly)
HRD--------------- Managing Employee's Feedback
HRD ------------ Recruitement of skilled employees
Sales ----------- Sales of newly launched product
for employee b-
Category -------- Title
--------------------------------------------------------
Finance----------- Creating Report (Quarterly)
Finance --------- maintaining annual accounts
HRD ------------ Recruitement of skilled employees
HRD--------------- Managing Employee's Feedback
The problem is that I don't know the exact appearance of an employee in the profile table, and thats why I think joins are out of scope(I am not an expert in SQL)
Hope this may clear some fog.Thanks.
modified on Tuesday, August 19, 2008 8:33 AM
|
|
|
|
|