I really want to do something useful when a PK violation occurs but I hate trapping error numbers... they just don't read right without comments (they're certainly not self documenting).
I know I can find all the potential error numbers at SQL Server books online but I really want to be able to pass the error number to some helper class...
How can I specify the content type of an attachment when sending emails using sp_send_dbmail? The content type is specified as application/octet-stream for Zip, PDF files. But I need to change it to application/zip, application/pdf.
The "file_attachments" parameter takes absolute paths of the attachments. Can not find a place to specify...
Error message returned 'An error occurred while processing the last operation. Error code 800401154 - Class not registered
The event log may contain additional troubleshooting information.'
The other thing is, the is a red arrow icon displayed over My Computer (Component Servers -> Computers -> My Computer). I have searched everywhere ...
Hi,
I have a data driven site with many stored procedures. What I want to eventually be able to do is to say something like:
For Each @variable in sproc inputs
UPDATE @TableName SET @variable.toString = @variable
Next
I would like it to be able to accept any number of arguments.
It will basically loop through all of the inputs a...
I want to get the results of a left join between two tables, with both having a column of the same name, the column on which I join. The following query is seen as valid by the import/export wizard in SQL Server, but it always gives an error. I have some more conditions, so the size wouldn't be too much. We're using SQL Server 2000 iirc ...
Hi,
I'm trying to connect at runtime with SQL Server 2008 with Delphi 2009 using DBExpress, it it's not working. When I set all the properties at design time, it works great, but at RunTime, I'm getting "unknown driver: mssql". Below is the code:
scnConexao := TSQLConnection.Create(nil);
scnConexao.DriverName := 'MSSQL';
scnCone...
I would like to use newId to generate random numbers. Usually you would use it just once, but I might be generating up to 10 random numbers per newId.
Is it random enough?
...
Hi Experts,
I am using asp.net and C#.
I have deployed my application on the server and now I come to know that my server would not provide me SMTP detail , is their any way I could send sms without smtp details.
I can use bot asp.net3.5 with C# or SQL Server 2005 to send mail.
Thanks in advance
...
Hi,
I have two tables which I would like to join by ID field. I was trying to use for this "INNER JOIN". Everything would be good but there are two issues:
As a result I receive twice column ID.
I have to omit specifying columns which should be displayed under select statement. I would like to use there a *.
I red that other sql-s ha...
I've a user account on a development SQL express on a remote server. This account has all privileges granted to it but when I use SQL express remotely then I'm not able to make changes to tables. If I log into the virtual machine and sign in with same user I can make changes.
It says I'm not database owner or system administrator. I thi...
How is it possible to know how much of the "DB quota" imposed by SQL Server express edition (4GB in old versions, 10GB in 2008R2) is in use?
Let's say I have a DB that is using 1GB, I want to know "9GB of free space".
Is it there a T-SQL command for this?
...
I have an internal website that is using integrated windows authentication and this website uses sql server & active directory queries via the System.Directory.Services namespace.
To use the System.Directory.Services namespace in ASP.NET I have to run IIS under an account that has the correct privileges and importantly have impersonatio...
I have a demo site where anyone can login and test a management interface.
Every hour I would like to flush all the data in the SQL 2008 Database and restore it from the original.
Red Gate Software has some awesome tools for this, however they are beyond my budget right now.
Could I simply make a backup copy of the database's data fil...
If any database spreads across multiple servers (ex. Microsoft Sql Server), how can we do join or filter operations. In my scenario, if suppose:
A single table spreads across multiple servers how can we filter rows based on user input?
If master table is there on one db server and transaction table is at another db server, how can we d...
I am using Hibernate in my project and there is a certain scenario where I want to use the uniqueResult() method on the org.hibernate.SQLQuery class to perform native SQL INSERT and UPDATE operations.
I did try using the executeUpdate() method on the same class. But I get an error saying that they are used for HQL updates only.
Please ...
EDIT
Sorry for the half post :(
It seems I cannot use a column from the parent query in a sub query.
How can I refactor this query to get what I need?
dbo.func_getRelatedAcnts returns a table of related accounts (all children from a given account). It goes up to the top level parent account of a given account and then selects all ch...
I'm trying to make a small application that takes a city & state and geocodes that address to a lat/long location. Right now I am utilizing Google Map's API, ColdFusion, and SQL Server. Basically the city and state fields are in a database table and I want to take those locations and get marker put on a Google Map showing where they are....
What is the quickest way to fill a SQL table with dummy data?
I have a wide table with about 40 fields of different kinds (int, bit, varchar, etc.) and need to do some performance testing. I'm using SQL Server 2008.
Thank you!
...
After a lot of problems with my web host, I disabled connection pooling within my application.
The problem was related to the number of concurrent connections : only five.
The result is that my web app doesn't crash. I didn't notice any poor performance after disabling it.
Are there any "collateral" or side effects to disabling con...
Not able to import application definition file!! Error: The metadata object with Name 'XYZ' and of Type 'LobSystemInstance' has a Property with Name 'DatabaseAccessProvider' that has either an invalid value or Type. Error was encountered at or just before Line: '10' and Position: '10'.
line 10 in ADF:
<"Property Name="DatabaseAccessP...