My SQL CLR UDTs Are Not Displayed Correctly In The Database, Or Are They?
Sep 14, 2007
Hi,
I'm new to SQL CLR programming and have recently implemented a few simple test UDTs. Typically I provide a property called Value and, if applicable, a method to display that value in a different format. For example, I havea UDT representing Australian states: the Value property returns the acronym (e.g. VIC) and the ProperName() method returns the full name (e.g. Victoria).
However, when I do a regular query, say SELECT * FROM Customers, the values in the column in which I am using the UDT are displayed as hex (I believe), for example '0x008064'.
Is this behaviour the result of a faulty implementation on my part or is it just the way SQL Server displays a non-native data type?
Here's the essential implementation code:
[Serializable]
[SqlUserDefinedType(Format.UserDefined, IsByteOrdered = true, MaxByteSize = 58, IsFixedLength = false)]
public struct udt_au_stateId : INullable, IBinarySerialize
{
private bool _isNull;
private AU_StateId _state;
private enum AU_StateId { ACT, NSW, NT, QLD, SA, TAS, VIC, WA }
public void Read(BinaryReader r)
{
SetStateId(r.ReadString());
}
public void Write(BinaryWriter w)
{
w.Write(_state.ToString());
}
public SqlString Value
{
get { return _state.ToString(); }
set
{
if (!SetStateId(value.ToString()))
throw new ArgumentException("'" + value.ToString() + "'" + " is not a valid Australian state or territory.");
}
}
public SqlString ProperName()
{
return GetProperName();
}
public override string ToString()
{
if (_isNull)
return "<NULL>";
else
return _state.ToString();
}
public bool IsNull
{
get { return _isNull; }
}
public static udt_au_stateId Null
{
get
{
udt_au_stateId u = new udt_au_stateId();
u._isNull = true;
return u;
}
}
public static udt_au_stateId Parse(SqlString s)
{
if (s.IsNull)
return Null;
else
{
udt_au_stateId u = new udt_au_stateId();
u.Value = s;
return u;
}
}
/* some implementation details omitted */
Best regards,
Ieyasu
View 6 Replies
ADVERTISEMENT
Oct 15, 2006
So i finally figured out how to create custom transform and add an icon to it. However - when i added the component to toolbox it appears as a file icon (when i didnt have icon it appeared as a blue box) - in the data flow designer it appears as the correct image.
From BOL wrote:"The Data Flow toolbox uses the 16x16, 16-color image type, while
the design surface of the data flow tab uses the 32x32, 16-color image
type. Both are default image types for icons created using Microsoft
Visual Studio 2005."
I assume this has something to do with it - my ico is default 32x32 - however, what would be the way to fix it?
View 6 Replies
View Related
Nov 8, 2000
In my main database I have declared a number of User Defined types for consistency across tables. However, as one might expect, I cannot then use the UDT in stored procs as temporary table datatypes since the UDT is not present in Tempdb. If I have to declare my #temp table columns as the native types, I lose the advantage. What is the preferred way of tackling this - could I create the UDT in model? or run scripts at server startup to create them in tempdb?
View 1 Replies
View Related
Oct 22, 2007
I have the following query in an ExecuteSQL Task:
Insert Into Table2
Select * From Table1 Where Column1Val = '4'
As you can see, I don't need any parameters so I havent configured any. Also, there should not be any result set so I shouldnt need to configure a resultset parameter.
Why is the above query failing with
Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly
View 4 Replies
View Related
Jun 4, 2007
What's the current opinion on UDTs? Are they valuable? Do the benefits outweigh the costs? Are they an absolute no-no? Has there been anything authorative or groundbreaking on the topic since Alex P's blog back in October 2005?
http://weblogs.asp.net/alex_papadimoulis/archive/2005/10/20/428014.aspx
View 4 Replies
View Related
Feb 27, 2003
Hi Everyone,
Can anyone help me with this little problem that im stuck with.
As part of the initial snapshot using merge replication, i am creating the initial schema on the subscriber database however it seems as though it does not like UDDTs or defaults and hence does not create them on the subscribers.
Its looking likely that I may have to create a script which executes on the subscriber which creates the initial schema then use merge replication to transfer data.
Does Merge Replication support UDTs/Defaults? If so how does it work?
Ive search many places though have come up with nothing.
Please help. = (
View 2 Replies
View Related
Apr 25, 2007
Can this be done in ASP.Net, as it stands my database views in my ASP.Net application are just standard
Unlike the view in MS Access which shows the collapsable linked data below the data (from a different table)
Many thanks
Rich
View 4 Replies
View Related
Jun 24, 2007
I have sql server 2005 express installed on an XP machine. When I browse for a database engine, SQL server 2005 management console displays machinenamesqlexpress in the local tab, BUT in the network tab only the machinename is displayed. Thus, I cannot connect to express from a networked machine.
Any help would be appreciated.
TIA,
Joe
View 3 Replies
View Related
Apr 25, 2007
Iam trying to backup my database but nothing is backedup and no error message is displayed. Here is my code.
<%@ Page Language="VB" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Net.Mail" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Try
Dim con As SqlConnection
con = New SqlConnection("Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|safetydata.mdf;Integrated Security=True;User Instance=True")
Dim com As New SqlCommand("BACKUP DATABASE safetydata TO c:ackuptest")
com.Connection = con
com.Connection.Open()
com.ExecuteNonQuery()
com.Connection.Close()
Response.Redirect("DeveloperBackup_success.aspx")
Catch ex As Exception
Response.Redirect("~Developerackup_error.aspx")
End Try
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>BackUP Page</title>
View 3 Replies
View Related
Jul 23, 2005
I have the following code but do not know the best way to return the updatedDataTable back to the database. I believe I can use the Update method of theData Adapter, BUT if true, I also believe I have to 'long-hand' write codefor each individual column data that's being added......this seems a bitdaft considering that the data is already in the disconnected data table.Have I lost the plot?? Based on the code below, what is the correctapproach?Note: sqlcnn is defined at module level.Public Sub AddRequest(ByVal Eng As String, ByVal Bran As String, ByVal ReqAs String) Implements IHelpSC.AddRequestDim dtNew As New DataTable("dtNew")Dim drNew As DataRowsqlda = New SqlDataAdapter("SELECT * FROM ActiveCalls", sqlcnn)sqlda.Fill(dtNew)'Add and populate the new datarow with'data passed into this subroutinedrNew = dtNew.NewRowdrNew("CallTime") = Format(Date.Now, "dd MMM yyyy").ToStringdrNew("Engineer") = EngdrNew("Branch") = BrandrNew("Request") = ReqdtNew.Rows.Add(drNew)End SubHope one of you wizards can help.Rgds.....and Merry Christmas.Phil
View 2 Replies
View Related
Sep 2, 2007
I installed netframework 2.0 Visual Web developer and MSSQL 2005 express edition with SQL Server management express.I have got this configuration: 2*256 mb ram Intel Pentium 3.2Ghz Windows XP HUN SP2 latest version.server name: localhostSQLEXPRESSAuthentication: Windows AuthenticationI run aspnet_regsql.exe and the setup wizard created aspnetdb see here, Microsoft sql server management studio can see the database:But! When I run to the asp.net web application administration tool in Provider Configuration and chooseAspNetSqlProvider only 1then I click Select a single provider for all site management data link -> then testThe Tool write this:Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site
Administration tool, use the aspnet_regsql command-line utility to
create and configure the database, and then return to this tool to set
the provider.
View 5 Replies
View Related
Feb 20, 2008
I am setting up a web server and I'm having some issues with database connections. I am running Windows Server 2k3 and SQL Server 2005. The error I get is when I attempt to connect to the database, it's the following:
Cannot open database "dbReseacher" requested by the login. The login failed. Login failed for user 'userRes'.
The following is my connection string:
<add name="RESEARCHER" connectionString="Data Source={Sql Server}; Server=THRALL2; Database=dbReseacher; Uid=userRes; Pwd=password;"/>
In SQL Server Management Studio, the user userRes is listed under Security -> Logins, but it is not listed under Database -> dbResearcher -> Security -> Users. Originally it was listed under both and this didn't solve the problem.
Please let me know if you any ideas or questions that I can answer. Thanks a lot.
-Richard
View 1 Replies
View Related
May 2, 2015
Code :
protected void Page_Load(object sender, EventArgs e)
{
Session["ID"] = "2";
string strConnString = ConfigurationManager.ConnectionStrings["BSDConnectionString"].ConnectionString;
var con = new SqlConnection(strConnString);
using (var sda = new SqlDataAdapter())
[Code] ....
That was my code , now lets see what my problem is :
I am getting only two dates in a single row from sql to my asp.net webform and then bindng those dates in jQuery UI Datepicker. Now if i set session to 1 then date picker works well but if i put session = 2 , it shows the end date till 2020 which is wrong.
Below are the dates which are fetched from database and i have copied here for your ease.
When Session["ID"] = "1";
Start Date : 01/07/2014 00:00:00
End Date : 05/02/2015 00:00:00
When Session["ID"] = "2";
Start Date : 07/04/2015 00:00:00
End Date : 27/08/2016 00:00:00
I have set my mindate to startdate and maxdate to end date. please check and see where the error is happening.
Also point of interest is that if i don't fetch values from database and use only List<string> in my web method then every thing works well. like this :
[WebMethod]
public static List<string> GetDates()
{
List<string> arr = new List<string>();
arr.Add("2014-07-01");
arr.Add("2015-02-05");
return arr;
}
View 2 Replies
View Related
Aug 7, 2007
Hello All,I tried to set the access permissions for debugging stored procedure by reading the articlehttp://msdn2.microsoft.com/en-us/library/w1bhybwz(VS.80).aspxandhttp://technet.microsoft.com/en-us/library/ms164014.aspxI have tried to add the role to sysaminas follows1)SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_NAME = 'sp_sdidebug'(to find the sp)Error:--The stored procedure not found2)sp_addsrvrolemember 'Developmentswati.jain', 'sysadmin' though this is executed successfuly . Error is still persisting
Cannot debug stored procedures because the SQL Server database is not setup correctly or user does not have permission to execute master.sp_sdidebug.
View 3 Replies
View Related
Nov 10, 2005
Hi,
I have just installed MS SQL in my computer and I am trying to run MS
SQL and Visual studio for the first time. However I have run into a
problem that I can't solve. Basically the problem is that the data I
fetch from the database is not being displayed/bound to the ddl I have
on the page.
I have used VS to configure the sqlDataAdapter, DataSet, sqlConnection,
and the sqlCommands. Basically the data is being fetched from the
Northwind sample database. From the preview option on the
sqlDataAdapter I am able to preview the information from the database.
So it seems to work. I have also configured the ddl settings so that
the Categories table is the datasource. I have also set the ddl.DataTextField = "CategoryName"; ddl
.DataValueField = "CategoryID";
When I compiled and run the page, no error messages are generated, but
the ddl is still completely blank and I can't understand why.
Does anybody know how I can solve this?? :s
View 3 Replies
View Related
Jul 19, 1999
When using sp_who and sp_who2 on SQL Server 6.5 I seem to get inaccurate results .
Each spid seems to be using the same host name, and the host name used is one that hasn't been connected to SQL server for several months.
Is there a problem with the connection management ? If so how do I find this out ? and how do I fix it ?
View 2 Replies
View Related
Jan 4, 2007
We have a SQL Server 2005 database which holds all the companies scanned documents (in image fields). I have developed a report which allows the user to search for a contract and all relevant scanned documents are returned.
When I preview the report with Visual Studio Report Designer...SOME of the images are not displayed, I get the little red cross icon in the top left corner.
When viewed using Report Manager with a browser... The report displays ALL images... However, when I click on the print button and then the print preview button in Report Manager, some of the images do not appear (the same images that don't appear in the Report Designer preview.
Can anyone tell why I can see all the images through Report Manager and my Browser (IE7) but only some of the images when in Report Designer preview or Print Preview?
Any help would be appreciated.
View 1 Replies
View Related
Feb 23, 2007
Hi,
I have setup Merge replication with 2 publishers and one subscriber. On the subscription machine I can see publisher 1 listed under local subscriptions but not publisher 2. I have created the second subscription on publisher 2 and also tried to create the subscription again on the subscription machine but i get an error saying the 'Subscription already exists'.
Neither do I see the second subscription nor does it work as if it is subscribed to Publisher 2. What could be going wrong.
I would appreciate any help.
Thanks
tribal
View 5 Replies
View Related
Jun 12, 2006
1. I am using the webservice to render the images from a report, and they dont render.
I paste this URL to the browser
http://agamenon:90/ReportServer?%2fGescomRpts%2fRPT_MediosDesarrollo&rs%3aFormat=HTML4.0&rs:ImageID=6c809239-753f-4988-abcf-231416dff0d6
and I get this
No se encuentra la secuencia. No se encuentra el identificador de secuencia proporcionado a una operación en la base de datos del servidor de informes. (rsStreamNotFound) Obtener ayuda en pantalla
This is the code
the problem is that I need to know the streamid, and to know the streamid I first have to render the report where the image is to be placed.
This is the page getimage.aspx
protected void Page_Load(object sender, EventArgs e)
{
string reportPath = Server.UrlDecode(Request["report"]);
//string streamID = Request["streamid"];
ReportExecutionService rs = (ReportExecutionService)Session["rs"];
DataSourceCredentials[] credentials = null;
string showHideToggle = null;
string encoding;
string mimeType;
string extension;
Warning[] warnings = null;
ParameterValue[] reportHistoryParameters = null;
string historyID = null;
string[] streamIDs = null;
ServerInfoHeader sh = new ServerInfoHeader();
rs.ServerInfoHeaderValue = sh;
byte[] result = null;
ParameterValue[] reportParameterValues2 = null;
string deviceInfo = "<DeviceInfo>" +
//"<StreamRoot>" + streamRoot + "</StreamRoot>" +
"<Toolbar>False</Toolbar>" +
"<Parameters>False</Parameters>" +
"<HTMLFragment>True</HTMLFragment>" +
"<StyleStream>False</StyleStream>" +
"<Section>0</Section>" +
"<Zoom>" +
"</Zoom>" +
"</DeviceInfo>";
result = rs.Render("HTML4.0", deviceInfo, out extension, out mimeType, out encoding, out warnings, out streamIDs);
string streamID = streamIDs[0];
string encodingImage;
string mimeTypeImage;
byte[] image;
ParameterValue[] pv = (ParameterValue[])Session["reportParameterValues"];
//image = rs.RenderStream(reportPath, "HTML4.0", streamID, null, null, pv, out encodingImage, out mimeTypeImage);
image=rs.RenderStream("HTML4.0", streamID, null, out encodingImage, out mimeTypeImage);
Response.Clear();
Response.ContentType = mimeTypeImage;
Response.AppendHeader("content-length", image.Length.ToString());
Response.BinaryWrite(image);
Response.Flush();
Response.Close();
}
and this is the page of the report. Sorry for the long code.
if (reportCanBeRendered)
{
string deviceInfo;
string streamRoot;
Session["rs"] = rs;
streamRoot = ("getimage.aspx?report="+ (path + "&streamid="));
switch (format)
{
case "HTML4.0":
case "HTML3.2":
deviceInfo = "<DeviceInfo>" +
"<StreamRoot></StreamRoot>" +
"<Toolbar>False</Toolbar>" +
"<Parameters>False</Parameters>" +
"<HTMLFragment>True</HTMLFragment>" +
"<StyleStream>False</StyleStream>" +
"<Section>0</Section>" +
"<Zoom>" +
"</Zoom>" +
"</DeviceInfo>";
break;
default:
deviceInfo = "<DeviceInfo></DeviceInfo>";
break;
}
// SQLRS-ReportViewer
if (!(reportParameterValues == null))
{
//reportParameterValues2 = reportParameterValues.ToArray(typeof(ParameterValue));
//reportParameterValues2 = (ParameterValue[])reportParameterValues.ToArray(typeof(ParameterValue));
}
DataSourceCredentials[] credentials = null;
string showHideToggle = null;
string encoding;
string mimeType;
string extension;
Warning[] warnings = null;
ParameterValue[] reportHistoryParameters = null;
string historyID = null;
string[] streamIDs = null;
ServerInfoHeader sh = new ServerInfoHeader();
rs.ServerInfoHeaderValue = sh;
byte[] result = null;
ParameterValue[] reportParameterValues2 = null;
result = rs.Render(format, deviceInfo, out extension, out mimeType, out encoding, out warnings, out streamIDs);
streamRoot = "getimage.aspx?report=" + path + "&streamid=" + streamIDs[0];
//string reportPath2 = Server.UrlDecode(Request["report"]);
//string streamID = streamIDs[0];
////string streamID = "";
//ReportExecutionService rs2 = new ReportExecutionService();
//Session["rs"] = rs;
//rs2=(ReportExecutionService)Session["rs"];
//////ReportingService rs = (ReportingService)Session["rs"];
//string encodingImage;
//string mimeTypeImage;
//byte[] image;
//ParameterValue[] pv = (ParameterValue[])Session["reportParameterValues"];
//////image = rs.RenderStream(reportPath, "HTML4.0", streamID, null, null, pv, out encodingImage, out mimeTypeImage);
//image = rs2.RenderStream("HTML4.0", streamID, null, out encodingImage, out mimeTypeImage);
//Response.Clear();
//Response.ContentType = mimeTypeImage;
//Response.AppendHeader("content-length", image.Length.ToString());
//Response.BinaryWrite(image);
//Response.Flush();
//Response.Close();
// store ReportingServices and parameters object is session layer in case we need it for image streams
Session["rs"] = rs;
Session["reportParameterValues"] = reportParameterValues2;
switch (format)
{
case "HTML4.0":
case "HTML3.2":
System.Text.Encoding enc = System.Text.Encoding.UTF8;
// get the report as a string
string tmpReport = enc.GetString(result);
// replace all occurrences of report server link with current page link
tmpReport = tmpReport.Replace(reportServerURL.Replace("/ReportService.asmx", "?"), ("http://"
+ (Request["SERVER_NAME"]
+ (Request["SCRIPT_NAME"] + "?Report="))));
ReportPlaceholder.InnerHtml = tmpReport;
break;
default:
Response.ClearContent();
Response.AppendHeader("content-length", result.Length.ToString());
Response.ContentType = mimeType;
Response.BinaryWrite(result);
Response.Flush();
Response.Close();
break;
}
}
View 4 Replies
View Related
May 22, 2008
This is a situation I haven't handled before.
I have a stored procedure which uses a column of a table. Unfortunately, the table exists, but the column does not. Still when we create or alter it, it shows 'completed successfully'.
Also, when this script is executed on another server, it gives the respective error, correctly.
Is there any database option or setting which has been tampered or changed by mistake.
Your helpful suggestions are welcome. Thanks in advance.
View 2 Replies
View Related
Nov 3, 2005
I have the following query where I want to add more user friendly names to the column names that are selected in the query. For instance, I want to display the field Articlegroupname as Product Category. How do I do this ithout altering the underlying field name in the database?
SELECT Article.articleId
, Article.articleGroupId
, POHeader.poHeaderId
, POHeader.poHeaderId
, POHeader.supplierId
, POHeader.locationId
, POHeader.deliverydate
, POHeader.poDeliveredValue
, POHeader.poStatus
, POHeader.estTotalValue
, POHeader.receivedTotalValue
, POHeader.poCurrMultiplier
, POHeader.poCurrCode
, POHeader.ourRef
, POHeader.yourRef
, POHeader.poComment1
, POHeader.poComment2
, POHeader.UserId
, POHeader.poCurrFactor
, POHeader.InternalExternal
, POHeader.CompanyId
, POHeader.CustKeyIn
, POLines.poLineId
, POLines.poHeaderId
, POLines.articleId
, POLines.orderQty
, POLines.receivedQty
, POLines.articleCost
, POLines.poLineStatus
, POLines.newPrice
, POLines.receiveddate
, POLines.UserId
, POLines.spesArticle
, POLines.invoicedPrice
, POLines.invoicedValuta
, POLines.invoicedNOK
, articleGroup.ArticleGroupName
, articleGroup.exportAccount
, articleGroup.exportDept
, Articlegroup_2.g2_name
, Article.abc_code
, Article.articleName
, Article.articleStatus
, Article.articleUnit
, Article.stockInfoId
, Article.suppliers_art_no
, Article.tex_color
, Article.tex_quality
, Article.tex_size_id
, Brands.brandLabel
, Location.locationName
, Sesong.Sesongnavn
, Sesong.sesongutgaatt
, Supplier.name
FROM HIP.dbo.POLines POLines
LEFT JOIN HIP.dbo.POHeader
ON POHeader.poHeaderId=POLines.poHeaderId
LEFT JOIN HIP.dbo.Article
ON Article.articleId=POLines.articleId
LEFT JOIN HIP.dbo.articleGroup
ON Article.articleGroupId=articleGroup.articlegroupid
LEFT JOIN HIP.dbo.Articlegroup_2
ON Article.articleGROUPid2=Articlegroup_2.Articlegrou p_2_Id
LEFT JOIN HIP.dbo.articleStock
ON Article.articleId=articleStock.articleId
LEFT JOIN HIP.dbo.Brands
ON ARTICLE.BRANDID=BRANDS.BRANDID
LEFT JOIN HIP.dbo.Location
ON POHeader.locationID=location.locationID
LEFT JOIN HIP.dbo.Sesong
ON Article.sesongID=Sesong.SesongId
LEFT JOIN HIP.dbo.Supplier
ON Article.supplierID=supplier.supplierID
View 1 Replies
View Related
May 4, 2006
Hi,
What I mean is:
I have a decimal(19,10) variable called @value and it has the value 66.6666666666
I can round it using ROUND(@value, 0) and the result is 67.000000000
But what I really want is to get rid of all the zero's and the decimal point so that I end up with just 67
Thanks in advance,
Ian.
View 6 Replies
View Related
Jul 23, 2015
All of a sudden my user variables are not displayed.
I know that they exist because the package run is successful.
For better, quicker answers on T-SQL questions, click on the following...
[URL]
For better answers on performance questions, click on the following...
[URL]
View 4 Replies
View Related
May 27, 2008
Hi Guys,
I am creating a report in Reporting Services 2000. I have a stored procedure that returns 4 columns with one column having 21 weeks of entries in it. I am using matrix to group these 21 weeks as 21 week columns created dynamically but when I preview the report it is only displaying columns for first 5 weeks.
Any idea why Reporting services is not displaying the rest of the columns? Any limitation on maxiumum number of columns that can be generated dynamically in SSRS 2000?
Any help will be highly appreciated.
View 3 Replies
View Related
Sep 27, 2007
Hello,
I have a Sales cube and I want to be able to display Products and the
Price at which they were purchased in a given period. I have a
Product dimension while Price is a measure in my Sales Fact Table. Is there a way to have a "Group By" aggregation instead of a Sum? This way, I can show Products grouped by their list price.
My Product Dimension consists of product_numbers (such as 100, 101,
102 etc...)
My Sales Fact Table consists of sales data (such as product_key,
price, net_sales, returns, etc...) at the transaction level.
I want to be able to view the data like this:
Price Net_sales Returns
Product
100 $5.99 $2005 $320
101 $3.51 $7110 $998
where Net_sales and Returns are "summed" and Price is simply a "Group
By". In other words, this report would show the net sales and returns
by product for a given price.
I'd rather not use a Price dimension since we have hundreds of
products at hundreds of different prices. Moreover, this data is
already in the Sales Fact table.
Thanks for any help provided
View 1 Replies
View Related
Oct 4, 2007
Hi,
I have a sp like this:
Create PROCEDURE sp_child2 @inp int, @out int output
AS
SELECT @out = @inp * 10
GO
In the report screen i want the following:
A text box which will take the @inp(this will come automatically)
When i click the "view report" the output value should be displayed in the textbox i have in the report.
But the problem i am facing is with the above sp is its creating two text boxes automatically asking for @inp and @out.If i dont give anything in @out text box and press the view report an error is thrown asing me to fill the output box.
Isnt it supposed to be a output value?Am i doing something wrong?
please help...
View 1 Replies
View Related
May 8, 2007
Hi.
If i use ODBC to connect to my SQL server some text values are not displayed (I'm using nvarchar and ntext data types).
But if I use OLEDB everything works fine.I'm creating a normal table in html. I display an image next to the text.
If the text comes before the image it works but if it comes after it doesn't work when using ODBC.
Does anyone have any idea on how to solve this problem without changing the html?
Thanks for your help.
J:C:
<body>
<%
Dim sqlstmt
sqlstmt = "select top 3 * from News order by ID DESC"
set rs = connection.execute(sqlstmt)
%>
<table border="0" cellpadding="0" cellspacing="0" bordercolor="#111111" width="100%" id="AutoNumber7">
<%
do while not rs.eof
%>
<tr>
<td width="100%" valign="top">
<div align="left">
<font face="Verdana" size="1">
<a href="news.asp">
<img border="1" src="<%=rs("imagem")%>" align="left" width="32" height="87">
</a>
<a href="news.asp"><br>
<%=left(rs("news"),100)%>(...)
</a>
</font>
</div>
</td>
</tr>
<%
rs.movenext
loop
%>
</table>
</body>
View 5 Replies
View Related
Jul 5, 2007
I have a table which displays years (2007, 2006, 2005, etc.) as one of its fields. I need to have it display Year + " and prior" for the last row. Any thoughts on how I might do this? Thanks!
View 3 Replies
View Related
Mar 21, 2007
Hi,
I'm running the following query against a SQL Server 2003 database to receive the results below:
SELECT PayPeriod AS [Pay Period], SUM(PayHours) AS [Pay Hours]
FROM EmployeePayHours
GROUP BY PayPeriod
Pay Period Pay Hours713 80
714 120
717 59.5
718 80
719 80
A colleague of mine, however, is running the same query against the same database (using a different machine) and gets the following results.
Pay Period Pay Hours
713 80
714 120
717 59.500000000000021
718 79.999999999999972
719 79.999999999999972
Is there a setting somewhere that needs to be changed? Thanks.
View 1 Replies
View Related
Dec 19, 2006
Hi,
I have scheduled subscriptions for a report which has an image in it.
The report is subscribed to be saved in a Report Server File Share in HTML format.
When i open the saved report i see a placeholder x instead of the image.
When i change the subscription format to ADOBE pdf it works fine.
Has anyone faced this problem ?
Any help on this is appreciated.
Thanks
Sam
View 5 Replies
View Related
Mar 16, 2007
Hello everyone,
I have a Reporting Services report which must show photographs stored in a SQL Server database. The trouble is that the photos just don't display. The report just shows the little red cross icon.
When I use MS-Access forms and reports it works fine. But I need this to work with Reporting Services!
Help please!
Jerome
View 4 Replies
View Related
Jun 18, 2007
Config: SQL 2005 hosted from IIS.
I had a set of working reports on a test server that we are moving to the production box. One of these reports has web based embedded images which are pulled from share point (2003).
DomainSSRSAcctName is the account for:
The application pool for the web site with
eports and
eportserver virtual directories.
the SSRS and SQL service account
The SSRS Unattended Execution account
This account has read access to the SPS 2003 document library. I have verified this by using the account in IE to browse to the folder.
When I view this report from the production server I get a broken image link and not the image. I don't see any errors in the eventlog or the SSRS logs.
Any ideas why this isn't working?
Thanks,
-p
View 7 Replies
View Related
Jul 3, 2007
HiI'm not sure if this is a .net or a SQL issue. My development machine is using SQL 2005 while the live server is SQL2000. I have a smallmoney field in the database for holding a house rent. The following is used to display the contents on the page<asp:Label ID="lblrent" runat="server" Text='<%# Bind("rent", "(0:0.00)") %>'></asp:Label>In development, the number is displayed correctly, with the decimal place, .e.g. 200.50 but on the live server the number is displayed as 20050,00. What I have noticed in the database is that the number is held differentlySQL 2005 - 200.5000SQL 2000 - 20050Is there a difference between SQL 2000 and 2005? How do I get around this problem?
View 6 Replies
View Related