sql-server

Looking for books

When I was learning Visual Basic.net 2008 I found a book that not only taught the basics but by the end of the book I had developed a fully working database application. Does anyone know where I might find a simular book but using Visual C++? ...

Drop all tables in sql server database using ant script.

Can anybody help me with this? I prefer if I don't have to explicitly list the table names. ...

Native XML WebService Without Authentication

So this my first question here, let's look how it works. I'm working on a project, which has to to provide a "Native XML WebService" on a SQL Server 2005. The web service and the WSDL generation works fine. But there are troubles with the authentication. Is it possible to turn the authentication off? And if so how? ...

Doctrine SQL Server uniqueidentifier isn't cast as char or nvarchar when retrieved from the database.

When I retrieve a record from the database which has a column of type "uniqueidentifier", Doctrine fills it with "null" rather than the unique id from the database. Some research and testing has brought this down to a PDO/dblib driver issue. When directly querying via PDO, null is returned in place of the unique id. For reference, htt...

SQL Server 2008 and MySQL Daily Backups

Is there a quick and easy way to backup both SQL Server 2008 and MySQL, all their databases? Right now I have a batch script that runs, but I have to manually add a database each and every time, and I'm sick of maintaining it. So I want to set it up to backup all SQL Server and then all MySQL, I dont care if its two different solutions,...

sql query --need some suggestions

I have a table with list of cycle codes.CYCLE_DEFINITION. each and every cycle_code has 12 months entries in another table(PM1_CYCLE_STATE). Each and every month has a cycle_start_date and a cycle_close_date. i will check with a particular date(lets say sysdate) and check what is the current month of every cycle.additionally i will also ...

Unable to Connect to Reporting Services

I have a problem, when deploying report libraries through Axapta tool or directly from node in Dynamics Ax. I'm receiving the error: Unable to connect to http://xxxxx/reportserver/ReportService2005.asmx as specified in the config file for the report server at c:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServ...

Is there a way to customise messages produced by statements in SQL Server Query Analyzer?

If I run a simple query in SQL Query Analyzer, like: SELECT * FROM TableName the Messages pane always produces a message like: (30 row(s) affected) If I run a stored procedure with many statements, the messages are useless because there's no indication of what each one relates to. So firstly: Is there a way to customise the de...

How to update a single table using trigger in MS SQL 2008

I have a table PeroidicDeduction and the fields are ID(auto-increment),TotalDeduction(e.g.it can be loan),Paid(on which the deduction for each month),RemainingAmount, What I want is when every time I insert or update the table---RemainingAmount will get the value of TotalDeduction-SUM(Paid)....and writ the following trigger...but dosen'...

convert SQL Server StoredPorcedure to MySql

I need to covert the following SP of SQL Server To MySql. I am new to MySql.. Help needed. CREATE PROC InsertGenerator (@tableName varchar(100)) as --Declare a cursor to retrieve column specific information --for the specified table DECLARE cursCol CURSOR FAST_FORWARD FOR SELECT column_name,data_type FROM information_schema.co...

Cannot create a new VS data connection in Server Explorer

I have a local instance of SQL Server 2008 express edition running on my development PC. I'm trying to create a new data connection through Visual Studio Server Explorer. The steps are the following: Right click the "Data Connections" node => Choose Data Source. I select "Microsoft SQL Server" as the data source. The "Add Connection" ...

nested sql statements

Hello, I've a self join table when I delete or update it's id I want to delete or update all the direct and indirect affected records SQL server does not allow this type of cycle cascading I've decided to use triggers but this triggers will file recursively and they will be terminated at 34 level and I don't know the depth of records and...

iPhone Database & Server Database - iPhone updates only modifcations

Hello ! Every one. I have some query. First of all let's have an iPhone application flow which a normal application has. ( Content based application ) Application launches & checks for the network availability If network is available - iPhone downloads the data using web services or APIs We can store these response ( web service res...

SQL query: SUM values up to the current record

Basically, having this table: 12.10 2.35 21.45 35.26 I want to, in each record, calculate the sum of all previous records, like this: 12.10 | 12.10 2.35 | 14.45 21.45 | 35.90 35.26 | 71.16 ...

Pear MDB2 class and raiserror exceptions in SQL Server

Hi, in SQL Server it's possible to raise an error with raiserror(). I want to use a severity, which doesn't interrupt the connection. This error is raised in a stored procedure. In SQL Management Studio all is fine and I get my error code when executing this SP. But when trying to execute this SP via MDB2 in PHP5 this doesn't work. All I...

SQL Server dilemma, performance

Hello I am creating app where user can save options witch one is better? to save into user table varchar feeld smthing like ('1,23,4354,34,3') query for this is select * from data where CHARINDEX ( 'L', Providers , 0 ) > 0 create other table where user options are and just add rows select * from data where Providers in (select P...

Conversion failed when converting the varchar value to int

Microsoft SQL Server 2008 (SP1), getting an unexpected 'Conversion failed' error. Not quite sure how to describe this problem, so below is a simple example. The CTE extracts the numeric portion of certain IDs using a search condition to ensure a numeric portion actually exists. The CTE is then used to find the lowest unused sequence num...

SQL Server Management Studio: Open table for Editing through keyboard shortcut

While using SQL Server Management Studio (2008), is it possible to open a table in Edit mode through keyboard shortcut or even some special keyword I type while in "New Query" window? ...

SQL Server schema-owner permissions

if i do: CREATE SCHEMA [test] AUTHORIZATION [testuser] testuser doesn't seem to have any permissions on the schema, is this correct? I thought as the principal that owns the schema, you had full control over it? What permission do i need to grant testuser so that it has full control over the test schema only? Edit: by "full control"...

A network-related or instance-specific error occurred while establishing a connection to SQL Server

Hi I have two databases DB1 (used by my application) and DB2 (third party) under same SQL Server instance I get the following error SqlException ERROR: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the inst...