Showing posts with label asp. Show all posts
Showing posts with label asp. Show all posts

Friday, March 30, 2012

Problem with SqlCacheDependency

I've set up a SqlCacheDependency in my Asp.Net application, but the dependency invalidates the cache immediately every time the page is hit.

I think the problem may be with my SQL Query, but it seems to me to meet the requirements on the Special Considerations When Using Query Notifications page on MSDN. Could someone take a look at this query and tell me if I've done something wrong? Thank you.

Here's my query:

Code Snippet

USE [chameleon]

GO

SET ANSI_NULLS ON

GO

SET ANSI_PADDING ON

GO

SET ANSI_WARNINGS ON

GO

SET CONCAT_NULL_YIELDS_NULL ON

GO

SET QUOTED_IDENTIFIER ON

GO

SET NUMERIC_ROUNDABORT OFF

GO

SET ARITHABORT ON

GO

ALTER PROCEDURE [dbo].[usp_customers_by_site_id]

@.site_id INT

AS

SELECT

customers.customer_id,

customers.name,

customers.po_prefix,

customers.dt_created,

customers.created_by AS auid,

customers.po_required

FROM dbo.customers

WHERE customers.site_id = @.site_id

AND customers.is_active = 1

and here's the code in my Asp.Net site where I try to use the SqlCacheDependency:

Code Snippet

public List<Customer> GetCustomersBySite(int siteID)

{

List<Customer> customers = new List<Customer>();

if (HttpRuntime.Cache["CustomersBySite" + siteID] != null){

customers = (List<Customer>)HttpRuntime.Cache["CustomersBySite" + siteID];

}

else

{

using (SqlCommand command = new SqlCommand("usp_customers_by_site_id", Connection)){

command.CommandType = CommandType.StoredProcedure;

command.Parameters.Add("@.site_id", SqlDbType.Int).Value = GetDBValue(siteID, false);

SqlCacheDependency dependency = new SqlCacheDependency(command);

try{

Connection.Open();

SqlDataReader reader;

reader = command.ExecuteReader(CommandBehavior.SingleResult);

while (reader.Read()){

customers.Add(PopulateCustomer(reader));

}

HttpRuntime.Cache.Insert("CustomersBySite" + siteID, customers, dependency, DateTime.Now.AddMinutes(Configuration.CacheDuration), System.Web.Caching.Cache.NoSlidingExpiration);

}

finally{

Connection.Close();

}

}

}

return customers;

}

My apologies. I posted this in the wrong forum.

-Brad

Problem with SQL string using MS Access and OleDbConnection (ASP .NET)

The string concatination below works in the Query builder built-in to MS Access, but when I try it as an OleDbCommand it doesn't work.

SELECT ID, LastName + ', ' + FirstName AS Names FROM AgentNames;

Is there any other ways to return a combination like this using an OleDbCommand?

Thanks,

GrierOriginally posted by grier_allen
The string concatination below works in the Query builder built-in to MS Access, but when I try it as an OleDbCommand it doesn't work.

SELECT ID, LastName + ', ' + FirstName AS Names FROM AgentNames;

Is there any other ways to return a combination like this using an OleDbCommand?

Thanks,

Grier

Shot in the dark here but try [LastName + ',' + FirstName] as Names. If not, I dont know why that won't work.

Wednesday, March 28, 2012

Problem with sql server connection sting

Hi,
I am testing a asp page using sql server as the backend database. However, I
cannot connect to the database from asp. I have the following error coming
and I have also added the connection string that goes with the asp page.
Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E4D)
Login failed for user 'sa'.
/aspsqlserver/logonprocess.asp, line 16
cn = "Provider=SQLOLEDB.1;User ID=sa;password=;Initial Catalog=test;Data
Source = TSU_SUPER"
I do not user any password to get into the sql server. I can open it from
my Enterprise Manager without using the userid sa and any password. With thi
s
situation, any help is appreciated. Thanks in advance.Am Mon, 5 Jun 2006 09:24:01 -0700 schrieb Jack:

> Hi,
> I am testing a asp page using sql server as the backend database. However,
I
> cannot connect to the database from asp. I have the following error coming
> and I have also added the connection string that goes with the asp page.
> Error Type:
> Microsoft OLE DB Provider for SQL Server (0x80040E4D)
> Login failed for user 'sa'.
> /aspsqlserver/logonprocess.asp, line 16
>
> cn = "Provider=SQLOLEDB.1;User ID=sa;password=;Initial Catalog=test;Data
> Source = TSU_SUPER"
> I do not user any password to get into the sql server. I can open it from
> my Enterprise Manager without using the userid sa and any password. With t
his
> situation, any help is appreciated. Thanks in advance.
Maybe this helps:
http://support.microsoft.com/kb/307002/EN-US/
bye, Helmut

Monday, March 26, 2012

Problem with SQL in ASP.NET...

Hello,

I have the following SELECT statement I am using in asp.net page:

SELECT MonthName(Month([TransEntryDate])) AS MonthListed, Sum(Transactions.ListingPrice) AS SumOfListingPrice FROM Transactions GROUP BY MonthName(Month([TransEntryDate]));

I get the following error:

Undefined function 'MonthName' in expression.

This used to work with classic ASP, but I'm not sure how to form this to work with ASP.NET. I am using this because my results are showing months numerically and I'd like them to be returned with the actual month name (january, february, etc.)...

Any help would be greatly appreciated!MonthName is not a SQL Server keyword, its only support in Analysis Services. Is you .net project pointing to the same database as your classic asp?|||Yes pointing to same db... I'm not sure how to get the results I'm looking for though...|||Yes...pointing to same db, but not sure how to make this work for the results I need...|||I think that what I'm looking for is an example of how I could use the CASE Expression within my SELECT statement to return the month name (not the numeric value)... PLEASE HELP!!!!|||ah now why didn't you say so ;)


SELECT DATENAME(month, getdate()) AS 'Month Name'
|||I hate to be a pain...I'm new to this... Could you show me how to use this with my SELECT statement in my first post? Thank you!!!|||

SELECT DateName(month,[TransEntryDate]) AS MonthListed, Sum(Transactions.ListingPrice) AS SumOfListingPrice FROM Transactions GROUP BY [TransEntryDate]

NB Simply using "Group By" doesn't guarantee a sorted order.

Tuesday, March 20, 2012

Problem with searching Chinese in ASP

Hi,
Currently I am having trouble searching Traditional Chinese but not
English and numbers. My host's OS is in English and the asp site is
coded in Big5. It seems to me that some how all the Chinese within the
.txt file are @.#$!@.#$%# and not Chinese. Maybe that's the reason the
search script didn't recognize it.
Here's the test page:
www.owco.ca/searchtest.asp
You can copy and paste only the chinese text into the text field, and
no result will be returned. If you copy and paste the English text,
search result will be returned.
Thank you,
-DavidIn ASP you need to set session.codepage= the code page you are using for
Chinese - it is likely to be Session.CodePage = 950
For ASP.Net you need to configure the culture settings. Please check out
this link for an example.
http://www.indexserverfaq.com/susankongrulez.zip
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
<demidnight@.gmail.com> wrote in message
news:1135670597.170199.240460@.g47g2000cwa.googlegroups.com...
> Hi,
> Currently I am having trouble searching Traditional Chinese but not
> English and numbers. My host's OS is in English and the asp site is
> coded in Big5. It seems to me that some how all the Chinese within the
> .txt file are @.#$!@.#$%# and not Chinese. Maybe that's the reason the
> search script didn't recognize it.
> Here's the test page:
> www.owco.ca/searchtest.asp
> You can copy and paste only the chinese text into the text field, and
> no result will be returned. If you copy and paste the English text,
> search result will be returned.
> Thank you,
> -David
>|||Hi, Thank you for your reply.
I am on ASP 3.0
And the code page is set to:
<%
Response.Charset = "big5"
session.codepage = 950
%>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
And still won't work.

Friday, March 9, 2012

Problem with ReportViewer Control

I have an ASP.NET web site with form authentication.

When I use a ReportViewer control in a page (with a masterPage) and my report (ServerReport and Remote processingmode) has DateTime parameters I can't see that calendar gif in order to select a date. Same thing with a DropDownList bound to a dataset for another paramater (I can't see that arrow from the right side of DropDownList so I can't dropdown it).

When I want to see the report with a browser direct from my Reports site it works fine. Only in reportviewer has this simptoms.

IE has some errors in script

1. 'RSClientController' is undefined

2. 'ClientControllerctl00_contentPanel_ReportViewer1' is null or not an object.

3. 'DropDownParamClass' is undefined.

I found other posts with the same simptoms:

http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=327473&SiteID=1

http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=358590&SiteID=1

but the solution found there doesn't apply to me.

Any suggestions ?

Hi Sorin,
I have the same problem regarding Reporting Service. Is this problem has been solved ? Could you please advice me how to solve the problem?

Best Regards,

Joko|||A work around could be to use a IFrame and changing its source to the report you would like to display.

Problem with ReportViewer Control

I have an ASP.NET web site with form authentication.

When I use a ReportViewer control in a page (with a masterPage) and my report (ServerReport and Remote processingmode) has DateTime parameters I can't see that calendar gif in order to select a date. Same thing with a DropDownList bound to a dataset for another paramater (I can't see that arrow from the right side of DropDownList so I can't dropdown it).

When I want to see the report with a browser direct from my Reports site it works fine. Only in reportviewer has this simptoms.

IE has some errors in script

1. 'RSClientController' is undefined

2. 'ClientControllerctl00_contentPanel_ReportViewer1' is null or not an object.

3. 'DropDownParamClass' is undefined.

I found other posts with the same simptoms:

http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=327473&SiteID=1

http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=358590&SiteID=1

but the solution found there doesn't apply to me.

Any suggestions ?

Hi Sorin,
I have the same problem regarding Reporting Service. Is this problem has been solved ? Could you please advice me how to solve the problem?

Best Regards,

Joko
|||A work around could be to use a IFrame and changing its source to the report you would like to display.

Problem with report viewer

Hi,

I recently upgraded by ASP.Net 1.1 application to 2.0. 1.1 application was using awReportViewer to view the reports.

But, when upgraded, awreportViewer doesnt display the RS2005 enhancements like sorting, etc...so I decided to replace it with Report Viewer control in VS2005.

Now the problem starts, Whenever I try accesing the reports through application, it gives me error "Client found response content type of '', but expected 'text/xml'.
The request failed with an empty response."

This is how I have coded,

ReportViewer1.ProcessingMode = ProcessingMode.Remote

ReportViewer1.ServerReport.ReportServerUrl = New Uri(http://localhost/ReportServer/reportservice.asmx)

ReportViewer1.ServerReport.ReportPath = reportname

//Some code to set parameters in Report Paramater "parameters"

ReportViewer1.ServerReport.SetParameters(parameters)

My questions:

1. Am I going wrong somewhere in the above code?

2. Can awReportViewer be modified / upgraded so that it can support RS2005 features like sorting, multivalued parameters?

TIA

Tanmaya

Change the ReportServerUrl to be 'http://localhost/reportserver' and you should be in business.|||Great...its working now...thanks a ton :)

Wednesday, March 7, 2012

problem with repeating records

hello i'm using asp.net 2 with VB and i have a table in my db the problem is that table has a repeated records likethis image
now i want to update the absence record but cos it's repeated it will only update one record what i want is to apply the update on all other records ? hope u can help me .thankscan you rephrase your question? What is the UPDATE statement you have currently?|||hello ndinakar, i will explain my prob again i have a page has a details view and sqldatasource the details show one record as u know there are some records repeated as in the image i posted i'm using the sqldatasource auto statement update, but it doesnt update and it did updated once but only one value and the other repeatd values still as they are what i want is when i update one value it auto update all other repeated values, hope this clear and hope u can help me.|||What is the UPDATE statement you have? Do you have any primary key for the table? Pls post the table structure and some sample data.|||ok this my table's columns :
ID uniqueidentifier(primary key)
serial Int
stage(1st grade,2nd grade,...etc) char
class nchar
subject varchar
marks char
total nchar
absence nchar
ranking char

the update statement is the auto generated statement in the sqldatasource here's the sqldatasource code in my page:

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="CompareAllValues"
ConnectionString="<%$ ConnectionStrings:aspnetcon %>" DeleteCommand="DELETE FROM [grades] WHERE [id] = @.original_id AND [serial] = @.original_serial AND [stage] = @.original_stage AND [class] = @.original_class AND [subject] = @.original_subject AND [marks] = @.original_marks AND [total1] = @.original_total1 AND [total2] = @.original_total2 AND [status] = @.original_status AND [absence] = @.original_absence AND [ranking] = @.original_ranking"
InsertCommand="INSERT INTO [grades] ([id], [serial], [stage], [class], [subject], [marks], [total1], [total2], [status], [absence], [ranking]) VALUES (@.id, @.serial, @.stage, @.class, @.subject, @.marks, @.total1, @.total2, @.status, @.absence, @.ranking)"
OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT * FROM [grades] WHERE (([stage] = @.stage) AND ([subject] = @.subject) AND ([class] = @.class))"
UpdateCommand="UPDATE [grades] SET [serial] = @.serial, [stage] = @.stage, [class] = @.class, [subject] = @.subject, [marks] = @.marks, [total1] = @.total1, [total2] = @.total2, [status] = @.status, [absence] = @.absence, [ranking] = @.ranking WHERE [id] = @.original_id AND [serial] = @.original_serial AND [stage] = @.original_stage AND [class] = @.original_class AND [subject] = @.original_subject AND [marks] = @.original_marks AND [total1] = @.original_total1 AND [total2] = @.original_total2 AND [status] = @.original_status AND [absence] = @.original_absence AND [ranking] = @.original_ranking">
<DeleteParameters>
<asp:Parameter Name="original_id" Type="Object" />
<asp:Parameter Name="original_serial" Type="Int32" />
<asp:Parameter Name="original_stage" Type="String" />
<asp:Parameter Name="original_class" Type="String" />
<asp:Parameter Name="original_subject" Type="String" />
<asp:Parameter Name="original_marks" Type="String" />
<asp:Parameter Name="original_total1" Type="String" />
<asp:Parameter Name="original_total2" Type="String" />
<asp:Parameter Name="original_status" Type="String" />
<asp:Parameter Name="original_absence" Type="String" />
<asp:Parameter Name="original_ranking" Type="String" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="serial" Type="Int32" />
<asp:Parameter Name="stage" Type="String" />
<asp:Parameter Name="class" Type="String" />
<asp:Parameter Name="subject" Type="String" />
<asp:Parameter Name="marks" Type="String" />
<asp:Parameter Name="total1" Type="String" />
<asp:Parameter Name="total2" Type="String" />
<asp:Parameter Name="status" Type="String" />
<asp:Parameter Name="absence" Type="String" />
<asp:Parameter Name="ranking" Type="String" />
<asp:Parameter Name="original_id" Type="Object" />
<asp:Parameter Name="original_serial" Type="Int32" />
<asp:Parameter Name="original_stage" Type="String" />
<asp:Parameter Name="original_class" Type="String" />
<asp:Parameter Name="original_subject" Type="String" />
<asp:Parameter Name="original_marks" Type="String" />
<asp:Parameter Name="original_total1" Type="String" />
<asp:Parameter Name="original_total2" Type="String" />
<asp:Parameter Name="original_status" Type="String" />
<asp:Parameter Name="original_absence" Type="String" />
<asp:Parameter Name="original_ranking" Type="String" />
</UpdateParameters>
<SelectParameters>
<asp:CookieParameter CookieName="stg" Name="stage" Type="String" />
<asp:CookieParameter CookieName="sub" Name="subject" Type="String" />
<asp:ControlParameter ControlID="DropDownList1" Name="class" PropertyName="SelectedValue"
Type="String" />
</SelectParameters>
<InsertParameters>
<asp:Parameter Name="id" Type="Object" />
<asp:Parameter Name="serial" Type="Int32" />
<asp:Parameter Name="stage" Type="String" />
<asp:Parameter Name="class" Type="String" />
<asp:Parameter Name="subject" Type="String" />
<asp:Parameter Name="marks" Type="String" />
<asp:Parameter Name="total1" Type="String" />
<asp:Parameter Name="total2" Type="String" />
<asp:Parameter Name="status" Type="String" />
<asp:Parameter Name="absence" Type="String" />
<asp:Parameter Name="ranking" Type="String" />
</InsertParameters>
</asp:SqlDataSource
the problem is there's a 5 or 6 subjects to every student and each subject in the table has a repeated record here's aone studentin my table so as u can see in this image the repeating records for example the absence and status columns, what i want is really simple i want when i update the absence for example i want to apply that update on all records not only one record hope u understand me .thanks for the help|||sorry. I am having internet problems at home so I could not reply earlier. I think if you remove the @.original_Id parameter from your where clause you could update all the records. Basically your WHERE condition is limiting the records. Based on your screenshot it appears all the other columns have same values except the @.original_id which is not in the screenshot. So I am guessing that is the condition limiting your results.

Problem with repeater

I'm new to ASP.NET and i've been banging my head aganist this problem for a few days now.

I have a repeater and then a repeater inside that repeater.

<asp:SqlDataSource ID="sqlRepeater1" runat="server" ConnectionString="<%$ ConnectionStrings:Inspections_DBCS %>"
SelectCommand="SELECT count(*) as mycount FROM insuranceco with (NOLOCK) where insurancecoid=@.insurancecoid" OnSelecting="sqlRepeater_Selecting" >
<SelectParameters>
<asp:Parameter DefaultValue='' Name="insurancecoid" Type="String" />
</SelectParameters>
</asp:SqlDataSource
<%
'sqlRepeater1.SelectParameters["insurancecoid"].DefaultValue = "123";
%
This returns:
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30451: Name 'sqlRepeater1' is not declared.
Source Error:

Line 38:
Line 39: <%
Line 40: sqlRepeater1.SelectParameters["insurancecoid"].DefaultValue = "123";
Line 41: %>
Line 42:

I tried a solution i saw on the web about using the onselecting event but that didn't pan out either

Protected Sub sqlRepeater_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) 'Handles sqlRepeater1.Selecting WithEvents
'Response.Write(e.Command.Parameters.Add)
'e.Command.Parameters.Add(e.Command.CreateParameter("P1", "test"))
'e.Command.Parameters.Add("P1", "value")

I have to be doing something wrong because i would think there has to be a way to reference variables when you are going from repeater to repeater i just dont know.

Please help my mask of sanity is starting to slip off.

Thanks

You can put this line in any event in the code behind file:

sqlRepeater1.SelectParameters["insurancecoid"].DefaultValue = "123";

You're using SqlDataSource yet I haven't seen where is the repeater.

|||There is the whole page as it is. I'm going to try putting that
sqlRepeater1.SelectParameters["insurancecoid"].DefaultValue = "123";

in the codebehind now and see what happens.

<%@. Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="ProcessOrders.aspx.vb" Inherits="ProcessOrders" title="Process Inspection Orders" %
<asp:Content ID="Content1" ContentPlaceHolderID="CPH1" Runat="Server"
<h1>Process Inspection Orders</h1>
<hr /
<asp:SqlDataSource ID="InspectionCompanys" runat="server" ConnectionString="<%$ ConnectionStrings:Inspections_DBCS %>"
SelectCommand="select inspectioncompany,inspectioncoid from inspectionco with (NOLOCK)"
</asp:SqlDataSource
<asp:SqlDataSource ID="sqlRepeater" runat="server" ConnectionString="<%$ ConnectionStrings:Inspections_DBCS %>"
SelectCommand="SELECT insurancecompany,insurancecoid FROM insuranceco with (NOLOCK) ">
</asp:SqlDataSource
<asp:Repeater id="ProcessOrder" EnableViewState="False" runat="server" DataSourceID="sqlRepeater">
<HeaderTemplate>
<table width="600" cellpadding="3" cellspacing="0">
</HeaderTemplate>
<ItemTemplate
<asp:SqlDataSource ID="sqlRepeater1" runat="server" ConnectionString="<%$ ConnectionStrings:Inspections_DBCS %>"
SelectCommand="SELECT count(*) as mycount FROM insuranceco with (NOLOCK) where insurancecoid=@.insurancecoid" OnSelecting="sqlRepeater_Selecting" >
<SelectParameters>
<asp:Parameter DefaultValue='' Name="insurancecoid" Type="String" />
</SelectParameters>
</asp:SqlDataSource
<%
sqlRepeater1.SelectParameters["insurancecoid"].DefaultValue = "123";
%
<tr>
<td style='width: 35%; height: 32px'>
<asp:Label ID="lblViewCompanyName" runat="server" Text='<%# EVAL("InsuranceCompany") %>'/></td>
<td style='height: 32px'>
<asp:Repeater ID="InsideLoop" EnableViewState=false runat="server" DataSourceID="SqlRepeater1">
<ItemTemplate>
<asp:Label ID="numberofrecords" runat="server" Text='<%# EvaL("mycount") %>'/>
</ItemTemplate>
</asp:Repeater
</td>
<td style='height: 32px'>
<asp:Label ID="lblInspectionCompany" runat="server" Text="Inspection Company:"/></td>
<td style='height: 32px'>
<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="InspectionCompanys" DataTextField="inspectioncompany" DataValueField="inspectioncoid" Value="test" />
</td>
<td>
<asp:Label runat="server" ID="lblAssignDate" Text="Assign Date:"></asp:Label><asp:TextBox ID="txtAssignDate1" runat="server"/>
</td>
<td>
<asp:Button ID="btAssign" runat="server" Text="Assign" />
</td>
</tr>
</ItemTemplate>
<SeparatorTemplate>
<!--<hr />-->
</SeparatorTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
</asp:Content|||Here is the codebehind

Imports System.Data
Imports System.Data.SqlClient

Public Class ProcessOrders
Inherits Page

Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

'Call BuildUserGrid()

End Sub

Sub BuildUserGrid(ByRef txtAssignDate As TextBox)

'ProcessOrder.DataSource = GetOrder()
'ProcessOrder.DataBind()
'Call GetOrder()
txtAssignDate.Text = "TEST"

End Sub

Function GetOrder() As DataView

Dim dstUsers As DataSet
Dim objConnection As SqlConnection
Dim dadResults As SqlDataAdapter
Dim dvwUsers As DataView

Dim strServer As String 'Which server is this connection
Dim strDatabase As String 'Which database is this connection
Dim strUserID As String 'What SQL Server UserName
Dim strPassword As String 'What SQL Server Password
Dim strQuery As String 'My SQL QUERY

strServer = ConfigurationSettings.AppSettings("server")
strDatabase = ConfigurationSettings.AppSettings("database")
strUserID = ConfigurationSettings.AppSettings("userid")
strPassword = ConfigurationSettings.AppSettings("password")

strQuery = "SELECT insurancecompany "
strQuery = strQuery & "FROM insuranceco with (NOLOCK) "

Response.Write("WOW")

'dvwUsers = Cache("MyInspection")
If dvwUsers Is Nothing Then
dstUsers = New DataSet()
objConnection = New SqlConnection("Server=" & strServer & ";UID=" & strUserID & ";PWD=" & strPassword & ";Database=" & strDatabase)
dadResults = New SqlDataAdapter(strQuery, objConnection)
dadResults.Fill(dstUsers, "MyInspection")
dvwUsers = dstUsers.Tables("MyInspection").DefaultView()
'Cache("MyInspection") = dvwUsers
End If

'objConnection.Close()

Return dvwUsers

End Function

Protected Sub sqlRepeater_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) 'Handles sqlRepeater1.Selecting WithEvents
'Response.Write(e.Command.Parameters.Add)
'e.Command.Parameters.Add(e.Command.CreateParameter("P1", "test"))
'e.Command.Parameters.Add("P1", "value")

'insurancecoid

End Sub
End Class|||When i put the sqlrepeater1 line it gives me an error.
But it only errors when i have the repeater inside the first repeater.
Is it impossible to do a repeater inside a repeater? Is there some longer way to reference a variable when you are inside a repeater because it just seems like it is something to do with being inside repeater #1.

If i put the 2nd repeater (sqlrepeater1) and the code outside of the first repeater it works.

Compiler Error Message: BC30451: Name 'sqlRepeater1' is not declared.

Source Error:

Line 73: 'insurancecoid
Line 74:
Line 75: sqlRepeater1.SelectParameters["insurancecoid"].DefaultValue = "123";
Line 76: End Sub
Line 77: End Class

Problem with regional settings I think

I have a developer server (which we run ASP.NEt solutions against) it's an
MSDE instance and then we have another "LIVE" server which also has an MSDE
instance.
We are using Crystal Reports to get Reports out of the Databases and the
reports look different when we run them against the servers.
A Total ( in the report) on our Develooper Server shows as 2,00 in the
report but on out LIVE one.. it shows as 200,00 ... so I'm thinking it has
something to do with how the MSDE is returning numbers (floats) and Thousand
Separators...
Where do I start to check for these things?
Best regards/
Lars NetzelIt's not the thousands separator. It's the decimal point. In Europe,
you'll see the comma used to mark the decimal point. I'd check the regional
settings on both those boxes.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com
.
"Lars Netzel" <nospam@.doamin.com> wrote in message
news:eW7o2AGBFHA.2428@.TK2MSFTNGP14.phx.gbl...
I have a developer server (which we run ASP.NEt solutions against) it's an
MSDE instance and then we have another "LIVE" server which also has an MSDE
instance.
We are using Crystal Reports to get Reports out of the Databases and the
reports look different when we run them against the servers.
A Total ( in the report) on our Develooper Server shows as 2,00 in the
report but on out LIVE one.. it shows as 200,00 ... so I'm thinking it has
something to do with how the MSDE is returning numbers (floats) and Thousand
Separators...
Where do I start to check for these things?
Best regards/
Lars Netzel|||I have checked the regional settings in the Windows OS on both Servers..
they are identical (Swedish Settings) I'm wondering if there are any
regional settings in teh SQL server itself... and if so where do I find
that?
/Lars
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:%23qxBgiGBFHA.2540@.TK2MSFTNGP09.phx.gbl...
> It's not the thousands separator. It's the decimal point. In Europe,
> you'll see the comma used to mark the decimal point. I'd check the
> regional
> settings on both those boxes.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com
> .
> "Lars Netzel" <nospam@.doamin.com> wrote in message
> news:eW7o2AGBFHA.2428@.TK2MSFTNGP14.phx.gbl...
> I have a developer server (which we run ASP.NEt solutions against) it's an
> MSDE instance and then we have another "LIVE" server which also has an
> MSDE
> instance.
> We are using Crystal Reports to get Reports out of the Databases and the
> reports look different when we run them against the servers.
> A Total ( in the report) on our Develooper Server shows as 2,00 in the
> report but on out LIVE one.. it shows as 200,00 ... so I'm thinking it has
> something to do with how the MSDE is returning numbers (floats) and
> Thousand
> Separators...
> Where do I start to check for these things?
> Best regards/
> Lars Netzel
>
>|||Did you try changing to, say, US? Also, if the SQL Server service is
running on a domain account, log on with that account and check its
settings.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com
.
"Lars Netzel" <nospam@.doamin.com> wrote in message
news:%23ABo9rGBFHA.3512@.TK2MSFTNGP10.phx.gbl...
I have checked the regional settings in the Windows OS on both Servers..
they are identical (Swedish Settings) I'm wondering if there are any
regional settings in teh SQL server itself... and if so where do I find
that?
/Lars
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:%23qxBgiGBFHA.2540@.TK2MSFTNGP09.phx.gbl...
> It's not the thousands separator. It's the decimal point. In Europe,
> you'll see the comma used to mark the decimal point. I'd check the
> regional
> settings on both those boxes.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com
> .
> "Lars Netzel" <nospam@.doamin.com> wrote in message
> news:eW7o2AGBFHA.2428@.TK2MSFTNGP14.phx.gbl...
> I have a developer server (which we run ASP.NEt solutions against) it's an
> MSDE instance and then we have another "LIVE" server which also has an
> MSDE
> instance.
> We are using Crystal Reports to get Reports out of the Databases and the
> reports look different when we run them against the servers.
> A Total ( in the report) on our Develooper Server shows as 2,00 in the
> report but on out LIVE one.. it shows as 200,00 ... so I'm thinking it has
> something to do with how the MSDE is returning numbers (floats) and
> Thousand
> Separators...
> Where do I start to check for these things?
> Best regards/
> Lars Netzel
>
>

Problem With RecordSet

Hello SQL ASP guys,
I have written this small code:
<% @. Language=VBScript %>
<html>
<head>
<title>SQL Test</title>
</head>
<%
Dim objConn
Dim objRS
Dim strSQL
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
objConn.Open "Provider=SQLOLEDB; Data Source = (local); Initial Catalog =
BOTBS; User Id = ; Password="
%>
Connection Open
<%
strSQL = "SELECT barname from bars"
objRS.Open strSQL, objConn
objRS("barname")
response.write objRS("barname")
%>
This works upto objRS("barname")
Does anyone have any suggestions?J Bowman [293288] wrote:
> Hello SQL ASP guys,
> I have written this small code:
> <% @. Language=VBScript %>
> <html>
> <head>
> <title>SQL Test</title>
> </head>
> <%
> Dim objConn
> Dim objRS
> Dim strSQL
> Set objConn = Server.CreateObject("ADODB.Connection")
> Set objRS = Server.CreateObject("ADODB.Recordset")
> objConn.Open "Provider=SQLOLEDB; Data Source = (local); Initial Catalog =
> BOTBS; User Id = ; Password="
> %>
> Connection Open
> <%
> strSQL = "SELECT barname from bars"
> objRS.Open strSQL, objConn
> objRS("barname")
> response.write objRS("barname")
> %>
> --
> This works upto objRS("barname")
>
> Does anyone have any suggestions?
somevariable = objRS("barname")
also, you should have a userid and password in the connection string
unless you took that out when posting to this newsgroup?|||Got it... Thanks for your help Ken
"Ken" <kshapley@.sbcglobal.net> wrote in message
news:1155595738.014662.259630@.m79g2000cwm.googlegroups.com...
> J Bowman [293288] wrote:
> somevariable = objRS("barname")
> also, you should have a userid and password in the connection string
> unless you took that out when posting to this newsgroup?
>

Problem With RecordSet

Hello SQL ASP guys,
I have written this small code:
<% @. Language=VBScript %>
<html>
<head>
<title>SQL Test</title>
</head>
<%
Dim objConn
Dim objRS
Dim strSQL
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
objConn.Open "Provider=SQLOLEDB; Data Source = (local); Initial Catalog = BOTBS; User Id = ; Password="
%>
Connection Open
<%
strSQL = "SELECT barname from bars"
objRS.Open strSQL, objConn
objRS("barname")
response.write objRS("barname")
%>
--
This works upto objRS("barname")
Does anyone have any suggestions?J Bowman [293288] wrote:
> Hello SQL ASP guys,
> I have written this small code:
> <% @. Language=VBScript %>
> <html>
> <head>
> <title>SQL Test</title>
> </head>
> <%
> Dim objConn
> Dim objRS
> Dim strSQL
> Set objConn = Server.CreateObject("ADODB.Connection")
> Set objRS = Server.CreateObject("ADODB.Recordset")
> objConn.Open "Provider=SQLOLEDB; Data Source = (local); Initial Catalog => BOTBS; User Id = ; Password="
> %>
> Connection Open
> <%
> strSQL = "SELECT barname from bars"
> objRS.Open strSQL, objConn
> objRS("barname")
> response.write objRS("barname")
> %>
> --
> This works upto objRS("barname")
>
> Does anyone have any suggestions?
somevariable = objRS("barname")
also, you should have a userid and password in the connection string
unless you took that out when posting to this newsgroup?|||Got it... Thanks for your help Ken
"Ken" <kshapley@.sbcglobal.net> wrote in message
news:1155595738.014662.259630@.m79g2000cwm.googlegroups.com...
> J Bowman [293288] wrote:
>> Hello SQL ASP guys,
>> I have written this small code:
>> <% @. Language=VBScript %>
>> <html>
>> <head>
>> <title>SQL Test</title>
>> </head>
>> <%
>> Dim objConn
>> Dim objRS
>> Dim strSQL
>> Set objConn = Server.CreateObject("ADODB.Connection")
>> Set objRS = Server.CreateObject("ADODB.Recordset")
>> objConn.Open "Provider=SQLOLEDB; Data Source = (local); Initial Catalog =>> BOTBS; User Id = ; Password="
>> %>
>> Connection Open
>> <%
>> strSQL = "SELECT barname from bars"
>> objRS.Open strSQL, objConn
>> objRS("barname")
>> response.write objRS("barname")
>> %>
>> --
>> This works upto objRS("barname")
>>
>> Does anyone have any suggestions?
> somevariable = objRS("barname")
> also, you should have a userid and password in the connection string
> unless you took that out when posting to this newsgroup?
>