When Select The Datasource It Is Not Showing Properly
Feb 9, 2011i am trying to see the datasource that was added previously. but while trying to see..there is not any configure data source option..how to get it.
View 1 Repliesi am trying to see the datasource that was added previously. but while trying to see..there is not any configure data source option..how to get it.
View 1 RepliesI have the following simple linq to sql statement:
[Code]....
Instead of showing me the UserName from the aspnet_Users table, it showed me the SQL select statement.
I have arabic text recorded in ntext field inside database. The record looks ok in table rows but while retreiving and displaying on web page it shows something like these characters 1.شÙŠءIs there any solution or I am missing anything. I have tried with different meta tags and character sets,
View 1 RepliesI am using custom menu that internally uses javascrip and css. On my development server it is working fine but when I deploy the web application on windows server 2003 (64bit), the main menu is not showing properly for few hours (same day), however form next day of deployment its showing fine.
I am using VS 2008. Net 3.5.
The drop down list is used to determine what search criteria will be used to find an invoice. I tried to set the Select method in the switch statement. I don't understand how to set the Select Method and the select parameters programmatically though . I tried a few different ways but can't make the compiler happy. My ODS is in scope in the code behind. I'm not able to access it's properties though. The BAL resides in a separate project that is a ClassLibrary. I also have a using statement for the ClassLibrary project in the code behind.
give me an example of how to do this?
Mark up:
[Code]....
[Code]....
[Code]....
[Code]....
protected void Button19_Click(object sender, EventArgs e)
{
SqlDataSource conn = new SqlDataSource();
conn.ConnectionString = ConfigurationManager.ConnectionStrings["Database2ConnectionString1"].ToString();
conn.SelectCommandType = SqlDataSourceCommandType.Text;
conn.SelectCommand = "SELECT FROM table1 (a, b)VALUES(@a,@b)";
conn.SelectParameters.Add("a",TextBox1.Text);
conn.SelectParameters.Add("b", TextBox2.Text);
int rowsAffected = 0;
try
{
rowsAffected = conn.Selectt();
}
catch (Exception)
{
Label1.Text = "Error";
}
finally {
conn = null;
}
if (rowsAffected != 0)
{
Label1.Text = "Data saved";
}
}
well it returns error no overloading method for select (P.S. same code work fine for insert)
I will declarate a attribute, but it gives me an error
This query works fine and returns 1 record from type int:
SELECT TOP 1 DataObjectVersionID
FROM tblDataObjectVersionPropertyValueText
WHERE PropValue like CAST('00010281' AS ntext)
ORDER BY DataObjectVersionID DESC
And when I will declarate a attribute/parameter it gives me an error:
DECLARE @dataObjectVersionId INT
SET @dataObjectVersionId = SELECT TOP 1 DataObjectVersionID
FROM tblDataObjectVersionPropertyValueText
WHERE PropValue like CAST('00010281' AS ntext)
ORDER BY DataObjectVersionID DESC
Error message:
Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'SELECT'.
I have to display the contacts in gridview.I'm using objectdatasource. I have given the select method of objdatasource below:
Code:
Imports Microsoft.VisualBasic
Imports system.Data
Imports System.Data.SqlClient
Imports System.Collections
Imports System.Collections.Generic
Public Class Contactmanager
Dim conn As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("localConnectionString").ToString)......
I have a drop down, the drop down select values looks fine in mozilla but it doesnot show the full content in IE6 and 7,8.My Code
<td >
<asp:DropDownList id="drpttrainer" runat="server" Width="150px" OnSelectedIndexChanged="drpttrainer_SelectedIndexChanged" AutoPostBack="True">
[code]...
using vb.net/asp.net 2005 and SQL Server 2005 In my vb.net code I am setting the select statement for SqlDataSource1 and after that I am setting the DatasourceID for my gridview called grdGV (see below). However no rows are being displayed in the grid and the Rows.Count that I am printing out is 0. But when I taked the SqlDataSource1.SelectCommand printed out in my response.write statement below and query this in my SQL database I see 2 records being returned. So I am very puzzled why the database will return 2 records but the same exact query that is set in the SqlDataSource and then bound to the grid does not return 2 records?
I have also checked the DataSource.ConnectionString and it matches the database I am using.
[Code]....
I have the below code in my project..however its giving me an error on the update(bolded line)..please help me on this..
Private Sub ChangePassword1_ChangedPassword(ByVal sender As Object, ByVal e As System.EventArgs) Handles ChangePassword1.ChangedPassword
lblTempPassword.Text = ChangePassword1.NewPassword.ToString
CustomerName.Text = CType(Session("UserName"), String)
Dim FV1Updobjconn As Data.SqlClient.SqlConnection
FV1Updobjconn = New Data.SqlClient.SqlConnection()
FV1Updobjconn.ConnectionString = ConfigurationManager.ConnectionStrings("ASPNETDBconnectionString1").ConnectionString
FV1Updobjconn.Open()
Dim dtUpdating As New Data.DataTable()
Dim sqlUpdating As String = "UPDATE [SuperAdmin] SET [TempPasswd]= @SU2TempPasswd, [TempPwd]=@CU2TempPwd WHERE ([CustomerName] = [@CU2CustomerName])"
Dim cmdUpdating As New Data.SqlClient.SqlCommand(sqlUpdating, FV1Updobjconn)
cmdUpdating.Parameters.AddWithValue("@SU2UserId", UserIDValue.Text)
cmdUpdating.Parameters.AddWithValue("@SU2TempPasswd", lblTempPassword.Text)
cmdUpdating.Parameters.AddWithValue("@CU2TempPwd", False)
cmdUpdating.ExecuteNonQuery().... I get an error here saying..INVALID COLUMN "CU2CustomerName"
' Dim adUpdating As New Data.SqlClient.SqlDataAdapter(cmdUpdating)
' adUpdating.Fill(dtUpdating)
' Get the values needed to be passed on
' CtSUCompanyName.Text = dtUpdating.Rows(0)("CompanyName").ToString()
' CtSUCatPurch.Text = dtUpdating.Rows(0)("CategoriesPurchases").ToString()
FV1Updobjconn.Close()
End Sub
We have a SQL agent job tied to an SSIS package that process does an Update process on the dimensions and a full process on the Facts. In the morning the cube is showing that it is processed but the new data is not present. When it is manually run the SSIS package, it seems to work fine. Basically there is job having two steps, one is to update the BI Cube and next step is to update dimensions and facts. This jobs runs perfectly without any error, but first step executes as per the expectation and second fails to update with latest data. If we try to manually run the SSIS Package of the second step it perfectly updates with the latest data.
View 2 RepliesI've managed to render TreeView using custom made Hierarchical Datasource based on Linq queries on self referencing table. Rendered output looks well but... Every Node in NodeCollection has the same index = 0. Therefore when I click on any collapse button - the whole tree Collapses. In generated html every node has the same id = MainContent_TreeView1n0 I suppose n0 should increment to n1 n2 n3 and so on.
View 5 Repliesam developing an application using asp.net+ajax.i used calender extender control to select date and showing that date in a text box.my requirement is when select date from the previous year (i.e 2009) from the calender extender control...then a message should show like"you should not select the previous year date" and immediately current day date should fill in textbox.
View 4 RepliesI follow the tutorial and create DAL with Dataset. I created a Table Adapter with many column, but when i Call a simple Get for 2 column only. The system display 2 column and the rest column with empty data.
example: Table with 40 column define in Dataset in DAL. I have GetMember from Dataset with 40 column, some request only 1 column (with 39 empty), some request 22 column (with 18 empty column). Will this affact the performance?
Can i create 2 sitemaps in the same application? I tried doing it. When I tried to add a datasource to a treeview, it is showing first site map. Eventhough I wrote sitemapdatasource2, then also it is showing first sitemap contents. How can I solve this?
View 5 RepliesI have a following asp.net login page:
protected void Button1_Click(object sender, EventArgs e)
Lets say I had a query like SELECT Name FROM Customers WHERE CustomerID = '1'
How could I show the result in a textbox?
I'm trying to tie my login controls to my externally hosted database. I used the aspnet_regsql tool to create the appropriate tables in the database, but when I try to administer them through the "Administer Website" smart tag on the login control I cant connect to the new tables and such in the "Providers" tab.
View 5 Repliesi cant get to show all my content in data components? In choose your business object: I need my productsBLL in the dropdownlist when i have checked the checkbox for "show only data components". how do I get it up?
View 3 RepliesI have two pages for different companies with nearly the same ASPX markup and code-behinds (main alterations include certain fields from the same table being read-only in one and editable in another), #1 has a Select (for populating the DetailsView) and Update while #2 has Insert, Select and Update. #2's Insert and Update functions are not operating while #1's are just fine... I've gone through optimizing #2's codebase and I for the life of me cannot figure out why it's not functioning properly. What follows is #2's markup and codebehind for the relative functions accessed:
[Code]....
Here follows the code-behind:
[Code]....
I have a dataset with several tableAdapters in it. For some reason, one of them that I created doesn't show up when I try to put it into my objDataSource?
I can access and use it from codebehind (testing purposes for this post.
I have had a persistant problem, which occurs in "Visual Web Developer 2008" express, but also in "Visual Studio 2010"
When I drop a data control onto my webpage, and the select "Configure Data Source", the dialog box opens, but when I try and browse for the data file (could be MDB or XLS) the data file does not appear in the "Select (XML/MDB) file" - in the example below a XML file. If I set the filter to "All Files (*.*)" I can see all of the files EXCEPT the XML files.
The project is a web project, and is set to HTTP - using my local IIS.
while i was using sql server authentication, it was running a quite good but suddenly it starts showing an error 'Login Failed for user sa'
Here is my error-Login failed for user 'sa'.
Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'sa'.
Here is my code-
<add name="MyDB" connectionString="Data Source=ERPTEST;Initial Catalog=LoginDatabase;User ID=sa;Password=sa"
providerName="System.Data.SqlClient" />
How can I use the value of a GET form value as a SelectParameter?
Note: Both C# and VB.NET answers are fine.