sql-server

What goes between SQL Server and Client?

This question is an updated version of a previous question I have asked on here. I am new to client-server model with SQL Server as the relational database. I have read that public access to SQL Server is not secure. If direct access to the database is not a good practice, then what kind of layer should be placed between the server and...

Free DBMS with encryption support and without size limitations

I really need a free database which supports encryption, but doesn't have size limitations like 4 GB in SQL Server Express. Suggestions welcome! ...

How to insert a float into a SQL table in the right locale

I have to insert float values into different SQL Servers. Each one can have different locales so in one it the representation could be "42,2" and at another one "42.2" or whatever. How should i construct the query so it works in any SQL Server? Do i need to detect the locale of the server before constructing the query or what? ...

I can't display my pages on ASP.NET

Hi, I'm developing a web site with asp.net on localhost, I'm beginner. I wrote a login page and it works well. However when I click a link, the server can't load the page and gives this error: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not access...

Does table (string, string) require index?

In my database running on SQL Server 2008 R2 I have a special table for global variables: CREATE TABLE global_variables ( name NVARCHAR(50), value NVARCHAR(50) NOT NULL CONSTRAINT PK_global_variables PRIMARY KEY CLUSTERED ( name ASC ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS ...

SQL Server 2008 DBNETLIB error

Hi all Our ASp.net application is getting error as below" [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied " I can connect with Enterprise manager management studio and Query analyzer without any issue. It was running these applications with out any issue long time. last one week we are getting this er...

The database 'DB Name' is not accessible.

I am getting following error each time I tried to select database. The database 'DB Name' is not accessible. (Microsoft.SqlServer.Express.ObjectExplorer) Note: My OS is Win Vista. When I tried to open SQL Mgmt Studio as Run as administrator than I can able to access database properly. Any idea why it is giving error. I am also gettin...

Creating an appropriate index for a frequently used query in SQL Server

In my application I have two queries which will be quite frequently used. The Where clauses of these queries are the following: WHERE FieldA = @P1 AND (FieldB = @P2 OR FieldC = @P2) and WHERE FieldA = @P1 AND FieldB = @P2 P1 and P2 are parameters entered in the UI or coming from external datasources. FieldA is an int and highly n...

DatabaseName.bak File Transfer Problem

Possible Duplicate: Download databasename.bak file I have downloaded databasename.bak file from my hosting company, when i tried to restore that DB file in SQL server 2008 it is keep on giving me following error. The media family on device 'C:\go4sharepoint_1384_8481.bak' is incorrectly formed. SQL Server cannot process this...

iPhone connect to SQL server

Since i am new to iphone and mac dev, which is the suggested way to connect your application to an sql server/sql server express 2005 database (in my case to sync data with sqlite)? Thank you ...

MySQL or SQL Server

I'm creating an application that I want to run on either MySQL or SQL Server (not both at the same time) I've created two PHP classes DatabaseMySQL and DatabaseSQLSVR and I'd like my application to know which database class to use based on a constant set up at install. define(DB_TYPE, "mysql"); // or "sqlsrv" I'm trying to think of the...

How to Insert into remote table using Linked server withint Transaction ?

Hi, My Linked server is setup correctly , I am able to perform below query. INSERT INTO [RemoteServer].[Table] SELECT * FROM [LocalServer].[Table] However when I do the same thing within transaction BEGIN TRAN INSERT INTO [RemoteServer].[Table] SELECT * FROM [LocalServer].[Table] COMMIT TRAN I get Errors like O...

user instance login flag is not supported on this version of sql server

I have created an Asp.net website using VS 2008 and SQL Express 2008 on one PC. with db files in |Data Directory|. When i copied these website files to another PC ( having same VS 2008 and SQL Express 2008) its giving me error user instance login flag is not supported on this version of sql server ...

How do I select a column with the latest "datetime" data type?

How do I select a column with the latest "datetime" data type, in Visual Web Developer 2008, ASP.NET 3.5 ? In the config data source dialog my WHERE options are greater than cookie, control, etc... but I would like to select where the datetime is the latest in the table. (Select row from table where datetime is last updated....) Tha...

sql strictly equals, is there something ?

Possible Duplicate: SQL server ignore case in a where expression basically I need to check something like this select * from users where name = @name, pass = @pass the problem is that 'pass' = 'pAsS' is there something more strict for string comparison in sql (ms sql-server) ...

Have any idea about to add column by stored procedure?

I want to add column to table by stored procedure and the name of column should be parameter.'s value. ...

Random select is not always returning a single row.

The intention of following (simplified) code fragment is to return one random row. Unfortunatly, when we run this fragment in the query analyzer, it returns between zero and three results. As our input table consists of exactly 5 rows with unique ID's and as we perform a select on this table where ID equals a random number, we are st...

SQL Server: error when connecting

The application I'm using tries to connect SQL Server named instance running on a dedicated database server. Here's the error I'm getting: The TCP/IP connection to the host <instance_name>, port 1433 has failed. Error: Connection refused: connect. Is the firewall blocking my access or what? Should I dedicate a different port for this...

Conversion failed: SqlParameter and DateTime

I'm changing old, vulnerable SqlCommands with SqlParameters but get a SqlException: System.Data.SqlClient.SqlException {"Conversion failed when converting datetime from character string."} on sqlCommand.ExecuteScalar: Dim sqlString As String = _ "SELECT TOP 1 " & _ "fiSL " & _ "FROM " & _ "tabData AS D " & ...

Extract whole SQL Server database to CSV file

It is possible to extract all tables and rows of each table with one query or software in microsoft sql server? thanks ...