Hello:I didn't find any documentation that notes save point names are casesensitive, but I guess they are...Stored Proc to reproduce:/* START CODE SNIPPET */If Exists (Select * From sysobjects Where Type = 'P' and Name ='TestSaveTran')Drop Procedure dbo.TestSaveTranGoCreate Procedure dbo.TestSaveTranAsBeginDeclare@tranCount int--Transaction HandlingSelect @tranCount = @@TRANCOUNTIf (@tranCount=0)Begin Tran localtranElseSave Tran localtranBegin Try--Simulate Error While ProcessingRAISERROR('Something bad happened', 16, 1)/*If this proc started transaction then commit it,otherwise return and let caller handle transaction*/IF (@tranCount=0)Commit Tran localtranEnd TryBegin Catch--Rollback to save pointRollback Tran LOCALTRAN --<< NOTE case change--Log Error--Reraise ErrorEnd CatchEndGo--Execute Stored ProcExec dbo.TestSaveTran/*Should receive the following message:Cannot roll back LOCALTRAN. No transaction or savepoint of that namewas found.*//* END CODE SNIPPET */What is really strange, if there is a transaction open, then no erroris thrown. So if you execute as so:/* START CODE SNIPPET */Begin Tran--Execute Stored ProcExec dbo.TestSaveTran/* END CODE SNIPPET */There is no "Cannot roll back LOCALTRAN...." message.Questions:1-)Can someone confirm save point names are case sensitve and this isnot happening because of a server setting?2-)Is this a logic error that I am not seeing in the example codeabove?We have changed our code to store the save point name in a variable,which will hopefully mitigate this "problem".Thx.
I am retrieving a field from SQL and displaying that data on a web page. The data contains a mixture of text and html codes, like this "<b>test</b>". But rather than displaying the word test in bold, it is displaying the entire sting as text. How do I get it to treat the HTML as HTML?
I am new to sql sever management studio express, but a long time query analyzer user. This is a very basic question.
I want to change the default directory in sql server management studio express so that when I go to save a query, it is already pointed to the correct one. Where do I change that?
Hi y'all I want my written text in an textarea store in a sql database. Which format do i have to choose so sql server understands <br>. Now i use ntext and i get a scrambled <br> (2 cubes)Thanks in advance.Grtz
I have been coding in php for a while now and Im starting to get into asp.net. I use htmlarea in php as my html editor, but I was told that it shouldnt be used when using asp.net and sql server, because of it opens the server up for attack scripts. I dont understand why. Can someone help me out? I would really like to use a html editor with my applications but if it opens the server up for attacks then there is no point on using it.Thanks,Chad
I have html files which want to store in database SQL Server with data type image. How store and receive html file from database SQL Server by ASP.NET. Data type image is pointer 16 bit to file html. So where will content of files html with their image store ? Can I help you.
I have a table with a column that has html text. The column with html text is pretty big datatye varchar(max)... I wanted to check if any of you have any function that I can use to Strip out the HTML tags... I saw couple of version online, but it was running too slow..
I have the following query that supposes to merge multiple result in a single one and put it into a temporary table:
SELECT DISTINCT [AlphaExtension], STUFF((SELECT A.[NoteText] + '< BR />' FROM #temp A WHERE A.[AlphaExtension]=B.[AlphaExtension] FOR XML PATH('')),1,1,'') As [NoteText] FROM #temp B GROUP BY [AlphaExtension], [NoteText]
It is working fine unless by a simple detail. If you look at the second line of the query you will see that I am stuffing together a < BR /> tag (break line) because the contents of the field is going to be spitted directly to the screen and I want that the multiple results be displayed in different lines.
OK, the issue is that it is stuffing & lt ; BR / & gt ; instead < BR /> and therefore the browser is displaying the tag instead to break a line.
I am using FOR XML to generate the HTML and following is my query. I am using td { white-space:nowrap;} for the columns to used no wrap. But i want two columns which need to be wrapped. i have tried lots of options.
I need to export some Database data into a text file. My Query looks like this:
SELECT Category1, Category2, Category3 FROM dbo.tbl1 WHERE Category1 = 'JP-4' AND Category2> 4;
This works fine to get the data, however there is some html formatting in the table entries such as
`<p>,</p>, ,</br>` etc.
So ideally I need to remove those when exporting the data to the text file. I've tried to do it with a simple replace query but that didn't work. I've also got an issue with line splits and would need to remove the ( ).
The Data format is something like this:
Category1: JP-4 Category2: 4 Category3:<p>Neque porro quisquam est qui dolorem ipsum quia dolor</p> <p>amet, consectetur, adipisci velit</p> Category4:<p>Neque porro quisquam est qui dolorem ipsum quia dolor</p>
I got it to work like this with the replace function:
SELECT REPLACE(REPLACE("PHOTOGRAPHS",'<p>',''),'</p>','') FROM dbo.khia_tbl WHERE Category1= 'JP-4' AND Category2> 4;
But the issue is that I've got 15 columns in total and that I need to do it for several different tags for each column so , </br>,
as well as "" and different spaces so that would be a lot and I thought there must be a better/more efficient way of doing it...
I have someone who is sending me .htm documents, with a table in them, and I was wondering if there is a way to import the data from those tables into a SQL table, probably using an SSIS Package.
I am working on a code that will convert the query output into a html query output. That is the output of the query will be along with html tags so that we can save it as a html file.
The stored procedure that i have used is downloaded from symantec website and is working fine. Below is the code of that stored procedure.
/****** Object: StoredProcedure [dbo].[sp_Table2HTML] Script Date: 12/21/2011 09:04:30 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[sp_Table2HTML] ( @TABLENAME NVARCHAR(500), @OUTPUT NVARCHAR(MAX) OUTPUT,
[Code] ....
The code works fine and i am able to get the output with html tags. The problem occurs when i insert stylesheet in the code. I tried to enforce styles using a stylesheet for the table returned in my sql code, so that it will look good. below is the stylesheet code that i inserted between <head> and </head> tags.
If I run the procedure without the style sheet code, it works fine. but when i run the procedure with style sheet code i am getting the below errors.
Msg 105, Level 15, State 1, Line 98 Unclosed quotation mark after the character string '</table></body><'. Msg 102, Level 15, State 1, Line 98 Incorrect syntax near '</table></body><'.
[Code] .....
I checked the code and i am not able to find what is the mistake. I tried changing the quotation mark but it didn't worked.
I am trying to create a website that people can upload an image and have it saved to a database. Can someone point me in the right direction on this? What properties need to be saved in the db and how?
I have the need to allow a user to upload a file via the web and then save it into a database. THen I also need to be able to retrieve the file for download.
Can someone give me guidance as to code or a sample on how to do this.
When I am trying to save byte[] of an image to SQL server which is having an image column, I am getting an error like this " A severe error occured on the current command. The results, if any, should be discarded.". I am trying to save through a stored procedure. In the sp also, the datatype is image.
Hi im trying to save the location of images to a sql server db in the form of a url, i am trying to find out what datatype this comes under here. In ms access u can just select the hyperlink option in the data type dropdown and it saves the address entered into these fields as a hyperlink to the database. How can u do this in sql server ?????
Hello All, I have a problem with my database. It appears that it does not save the passwords for a login account that I have created. Every time I put in the password (using the Management Studio) it looks like the new password has been accepted. But when I look at the password using properties, the password is different. Any ideas? Thanks a lot for your help.
The SaveToSQLServer method has encountered OLE DB error code 0x80004005 (Client unable to establish connection). The SQL statement that was issued has failed.
------------------------------
The SaveToSQLServer method has encountered OLE DB error code 0x80004005 (Client unable to establish connection). The SQL statement that was issued has failed.
------------------------------ BUTTONS:
OK ------------------------------
===================================
Could not save the package "C:copiaPackage.dtsx" to SQL Server "ATLANTE". (Package Installation Wizard)
===================================
The SaveToSQLServer method has encountered OLE DB error code 0x80004005 (Client unable to establish connection). The SQL statement that was issued has failed.
The SaveToSQLServer method has encountered OLE DB error code 0x80004005 (Client unable to establish connection). The SQL statement that was issued has failed.
Scenario: I have created a dataset from an excel file to display it on a screen. Now I would like to save this same dataset in a SQL Server table. Any ideas would be greatly appreciated.
Hi, I want to upload a file (e.g. .xls, .pdf, .doc) and save into the Sql Server 2000 database through the web interface, and then to download this file. Any idea???
Hi,on my dev-machine i am running SQL Server 2005 Standard Edition.Now i have to do a project for a client who is on a server with ASP.NET 1.1 and SQL Server 2000.Is there a way i can build his database in 2005 and export or whatever it as SQL Server 2000?I don't really like the idea of installing 2000 and 2005 side by side on the same machine.Thank you very much in advance.Tjerk Heringa
Hi there,Not sure if this is the right place to ask. I have a custom object in ASP.NET called TransactionResponseObject.And I want to save this object AS IS - in one piece in SQL Server 2005 (instead of taking each and every property of it and individually saving it into separate columsn of a table in the database).Question:1). What type of SQL Server 2005 datatype will I be using in this case ?2). Is there a good and easy tutorial on converting a custom object into XML format? and perhaps saving the xml into the database (I feel it's just an extra step - meaning extra processing which i want to avoid).ThanksTorontoMale
I previously installed SQL 7.0 on my machine. The name of the Server was DEVELOPMENT. Unfortunately I needed to change the computer name, but I had already created my databases and did not want to lose the information. It was suggested that I should simply change the computer name and reinstall SQl. I changed the name to DEVSERVER. This seemed to work fine. Now I am having a problem when I try to create a DTS package on the renamed server from another SQL server . I receive the following error. "A connection could not be established to Development. Specified SQLserver not found" The server which is now called Devserver, is registered on the server I am creating the package from, however the message seems to imply that the server I'm connecting to is still called Developement and cannot be found. Any ideas would be appreciated.