Databinding To An ASP.NET Control

Mar 4, 2008

Hi,
i have a question, i have a VS2005 and a SQL server 2000 enterprise in my office that i used for web developement,
iam new to this, i made a data driven site using some automated controls available in the toolbox, but i need to made some manual process, like i need to make a LABEL show the SUM of specific number fields from my data base, they say i have to make a OLEDB connection using VB, but i don't know how,
can you tell me how?
Thanks 
 

View 13 Replies


ADVERTISEMENT

VB.NET Databinding

Sep 17, 2007

hello...
Probably a simple question but I have to ask...using visual basic 2005 express...

I have two tables one with last name and basic info, one with detailed info. Both set up with Primary key and Foreign key.

I have a combo box that displays the last names and then by clicking
the last name, text boxes fill with the "other" data from table1,
however,
there are some text boxes that I would like to fill with data from the table2.
Any pointers??

View 1 Replies View Related

DataBinding

Mar 25, 2008

I’m trying to teach myself C# and trying to create a simple (so I thought) little database using Infragistic's UltraWebGrid (Althought my question is more ASPish). Every sample I run across seems to only show the very basics and doesn’t seem to go into anything more than just a simple table and displaying it in a Gird. Which is pretty easy and I can do that all day and night.
Anyway, my database has three tables in a one-to-many relationship. The database is of Trucking companies and which states they service and they can service multiple states.
The database is like this:
Compnies:
TruckerID, Company Name, Address, etc.
ServiceStates:
TruckerID, StateID
StateNames:
StateID, StateName, StateAbbreviation
I would like to show the States that they service in a Hierarchical Grid.
I can write the SQL to do what I want to, basically do an inner join on ServicesStates and StateNames based on the TruckerID. I can sit all day and night getting what  I would like to display in the WebGrid in the query builder on the SQL server. I figured it wouldn’t be much of a stretch to be able to do that in UltraWebGrid (Or whatever floats your boat).
Anyway, on to my question. :)
While browsing the samples on everything, I've figured out, that I will need to use the SqlDataAdapter Class, to access the database. Then I'll need to use the SQLConnection Class, and populate a DataSet.
Now while in VS I can go to WebSite -> Add New Item -> DataSet slap my tables on there and away I go (at least it seems that way). If I do that, what exactly is the difference between doing that and using the dataset class? When I do that, is that not creating the dataset? I see all the classes it created (I named mine Trucking). I see all the SQL statements in the classes.
I imagine I must be missing something *REALLY* simple or this just went way over my head at by at least 40,000 ft.
Thanks,
marly 

View 14 Replies View Related

Databinding

Jun 19, 2008

Hai,i'm new asp.net and vb.net
 i have few textboxes and few dropdownlists.i want to insert data in (.mdf )database with these textboxes and dropdown lists
please anybody can tell me a sample and simple example.
 
Thanking you
 

View 3 Replies View Related

Databinding Question

Mar 11, 2007

Hi, I have a page created within VS 2005 which uses a detailsView with a SQLDataSource which has insert, edit and delete items allowed with it. The problem is that if I delete a record I dont want to refresh the page as I want to set a label value to say item deleted. The problem then though is to select the item to delete I have a drop down which populates the details view on index change, but if I delete the item I cannot do a databind when its complete because it just binds to the existing dataset and does not do a fresh call on the database.Is there a command I can run to refresh the dataset on click of the delete button?Thanks 

View 3 Replies View Related

SqlDataSource Lag / Databinding Question

Nov 9, 2006

Hey all,
 I had a few questions about how to properly use the sqldatasource -
I have a form with a single dropdownlist, databound to an sqldatasource that just has a select statement. Over the course of time, the client has requested additional dropdownlists, all of which point to different sqldatasources. After I reached 4 or 5, I noticed the page started to load incredibly slower. I played around with the caching features, and after a good while of reading up on it, finally was able to cache the page /data and notice an increase.
 Later, another 4 dropdownlists were added, 3 of which all take the same data. I assumed if I had 3 dropdownlists, which need the same data, I should use the same sqldatasource. What do you think? My page is behaving unaccepteably slow again.
As a test, I created a new page, and bound it in the same fashion. I slowly added more dropdownlists /sqldatasources, and found it lags a bit on the initial load time (maybe 10-12 seconds of processing time before the page loads). The tables it is pulling data from do not have a primary key, and i'm doing select statements that return roughly 100-200 rows of data (per dropdownlist on average). I'm only selecting 1 column name (no select * here)
 I'm just curious if anyone has experienced similar issues, and also if there is anything I should do as a best practice while working with the sqldatasource. I've used hundreds of these on forms, and never experienced a problem. I only started noticing this on pages that have multiple. Also, when using multiple dropdowns that need the same data (I know that sounds goofy - why have 3 dropdownlists with the same data) should I use 3 individual datasources?
 Thanks for your help in advance,
Mike

View 3 Replies View Related

Null Problem With Databinding

Apr 18, 2007

We are tired of null values coming out of from the database and we are directly coding behind UI decleratively.
We set up a null value coding standarts but I wonder what are the disadvantages to our approach
DataType         The default value we send                 ALLOW NULL 
int,bit,decimal                          0                                   NOnvarchar(string)                  " "(one space)                       NOdatetime                                                                       YESbinary                                                                           YES
*in datetime we do not allow nulls in places such as _CREATEDATE and _LASTMODIFYDATE fields.
What are other approaches for null besides writing your own layer to handle it ?

View 3 Replies View Related

Simple Databinding With A Textbox ?

May 28, 2006

Hello,
I would like to databind a textbox (the Text property) and I have try the following syntax:
Text='<%# Bind("au_fname") %>'
but there's no Datasource property for this control. I have defined a SqlDatasource object but can I link it to my Textbox. I have looked at the properties of the control: there's a Expressions section in which I can configure a connection string but thar's all.
When I run the page I have no error but the textbox field is empty.
Thanks for your help.

View 1 Replies View Related

Real-time Databinding

Sep 18, 2007

Does anybody know a good way to get a (near) live view of a sqlce database that doesn't involve ResultSets? I tried to use a resultset with the Sensitive option set, but it doesn't like the joins that I have to do in order to have the data make sense to the user.

Thanks

View 1 Replies View Related

DataBinding To Radio Button

Apr 27, 2006

I have a windows form containing some text boxes and radio buttons bount to an SQL Server database, with code like the following:

this.tbBorrowerLastName.DataBindings.Add (new Binding("Text", dsData.Tables["Results"],"BorrowerLastName"();

this.rbMale.DataBindings.Add(new Binding("Checked", dsData.Tables["Results"],"Male"))

If I add a new row and try to move there using the code below, nothing happens (neither movement to a new position nor error message), unless I remove the radio button bindings. (The same thing occurs if I attempt to move to any record that has a null value in the database field for a radio button).

myLastRow = dsData.Tables["Results"].NewRow();

dsData.Tables["Results"].Rows.Add(myLastRow);

I attempt to move by changing the value of the position property of the BindingContext object.

How can I retain the radio button bindings and still be able to add and move to a new row?

Any help would be appreciated.

View 1 Replies View Related

DataBinding RadioButtons Group

Feb 19, 2008

Hello Everyone!

I am getting started with DataBinding with SSE 2005 and VC#

The problem i am facing is that i need to bind a group of radio buttons eg: Duration Type: Days, Weeks, Months, Years.

The field type in the database is tinyint and the values are 1,2,3,4 for Days, Weeks, Months and Years respectively.

How can i bind a group of radio buttons to the tinyint data in table?

Any help/hint is appericiated.

Thankyou for taking the time to read this.

View 1 Replies View Related

DataBinding With Insert Query Problem

Jan 22, 2007

Hello,
I have a page with a detailsview where I can add articles (Generated by visual studio). Now the table contains a field (Autor) wich must contain the username of the Autor from the article. But when I run my page now I have to give it in manually ( in a textbox). I've searching for a way to bind the Profile Username with the insert Sql Query, @Autor value.
I tought maybe I should insert the value of the Profile username in the textbox and put the textbox visibel on false.
But When i saw the component code I saw that Text= is already bound, so it's not possible to insert a value<asp:TextBox ID="auteurTextBox" Visible="true" runat="server" Text='<%# Bind("auteur") %>'> Here is whole the page code (line 23 is the textbox). 1 <asp:FormView ID="FormView1" runat="server" DataKeyNames="id" DataSourceID="SqlDataSource1" AllowPaging="True" CellPadding="4" ForeColor="#333333" style="left: 30%; position: relative">
2 <EditItemTemplate>
3 <asp:Label ID="idLabel1" Visible="false" runat="server" Text='<%# Eval("id") %>'></asp:Label>
4 <asp:TextBox ID="auteurTextBox" Visible="false" runat="server" Text='<%# Bind("auteur") %>'>
5 </asp:TextBox>
6 soort:
7 <asp:TextBox ID="soortTextBox" runat="server" Text='<%# Bind("soort") %>'>
8 </asp:TextBox><br />
9 titel:
10 <asp:TextBox ID="titelTextBox" runat="server" Text='<%# Bind("titel") %>'>
11 </asp:TextBox><br />
12 text:
13 <asp:TextBox ID="textTextBox" Height="200px" TextMode="MultiLine" Rows="20" Width="260px" runat="server" Text='<%# Bind("text") %>'>
14 </asp:TextBox><br />
15 <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
16 Text="Update">
17 </asp:LinkButton>
18 <asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
19 Text="Cancel">
20 </asp:LinkButton>
21 </EditItemTemplate>
22 <InsertItemTemplate>
23 <asp:TextBox ID="auteurTextBox" Visible="true" runat="server" Text='<%# Bind("auteur") %>'>
24 </asp:TextBox><br />
25 Soort:
26 <asp:TextBox ID="soortTextBox" runat="server" Text='<%# Bind("soort") %>'>
27 </asp:TextBox><br />
28 titel:
29 <asp:TextBox ID="titelTextBox" runat="server" Text='<%# Bind("titel") %>'>
30 </asp:TextBox><br />
31 text:
32 <asp:TextBox ID="textTextBox" runat="server" Text='<%# Bind("text") %>'>
33 </asp:TextBox><br />
34 <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
35 Text="Insert">
36 </asp:LinkButton>
37 <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
38 Text="Cancel">
39 </asp:LinkButton>
40 </InsertItemTemplate>
41 <ItemTemplate>
42 <asp:Label ID="idLabel" Visible="false" runat="server" Text='<%# Eval("id") %>'></asp:Label><br />
43 <asp:Label ID="auteurLabel" Visible="false" runat="server" Text='<%# Bind("auteur") %>'></asp:Label><br />
44 soort:
45 <asp:Label ID="soortLabel" runat="server" Text='<%# Bind("soort") %>'></asp:Label><br />
46 titel:
47 <asp:Label ID="titelLabel" runat="server" Text='<%# Bind("titel") %>'></asp:Label><br />
48 text:
49 <asp:Label ID="textLabel" runat="server" Text='<%# Bind("text") %>'></asp:Label><br />
50 <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit"
51 Text="Edit">
52 </asp:LinkButton>
53 <asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete"
54 Text="Delete">
55 </asp:LinkButton>
56 <asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New"
57 Text="New">
58 </asp:LinkButton>
59 </ItemTemplate>
60 <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
61 <EditRowStyle BackColor="#2461BF" />
62 <RowStyle BackColor="#EFF3FB" />
63 <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
64 <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
65 </asp:FormView>
66 <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="CompareAllValues"
67 ConnectionString="<%$ ConnectionStrings<img src="images/smilies/biggrinn.gif" border="0" alt="">atabankConnectie %>" DeleteCommand="DELETE FROM [artikel2] WHERE [id] = @original_id AND [auteur] = @original_auteur AND [soort] = @original_soort AND [titel] = @original_titel AND [text] = @original_text"
68 InsertCommand="INSERT INTO [artikel2] ([auteur], [soort], [titel], [text]) VALUES (@auteur, @soort, @titel, @text)"
69 OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT * FROM [artikel2] WHERE [auteur] = @auteur"
70 UpdateCommand="UPDATE [artikel2] SET [auteur] = @auteur, [soort] = @soort, [titel] = @titel, [text] = @text WHERE [id] = @original_id AND [auteur] = @original_auteur AND [soort] = @original_soort AND [titel] = @original_titel AND [text] = @original_text">
71 <DeleteParameters>
72 <asp src="images/smilies/tongue.gif" border="0" alt="">arameter Name="original_id" Type="Int32">
73 <asp src="images/smilies/tongue.gif" border="0" alt="">arameter Name="original_auteur" Type="String">
74 <asp src="images/smilies/tongue.gif" border="0" alt="">arameter Name="original_soort" Type="String">
75 <asp src="images/smilies/tongue.gif" border="0" alt="">arameter Name="original_titel" Type="String">
76 <asp src="images/smilies/tongue.gif" border="0" alt="">arameter Name="original_text" Type="String">
77 </DeleteParameters>
78 <UpdateParameters>
79 <asp src="images/smilies/tongue.gif" border="0" alt="">arameter Name="auteur" Type="String">
80 <asp src="images/smilies/tongue.gif" border="0" alt="">arameter Name="soort" Type="String">
81 <asp src="images/smilies/tongue.gif" border="0" alt="">arameter Name="titel" Type="String">
82 <asp src="images/smilies/tongue.gif" border="0" alt="">arameter Name="text" Type="String">
83 <asp src="images/smilies/tongue.gif" border="0" alt="">arameter Name="original_id" Type="Int32">
84 <asp src="images/smilies/tongue.gif" border="0" alt="">arameter Name="original_auteur" Type="String">
85 <asp src="images/smilies/tongue.gif" border="0" alt="">arameter Name="original_soort" Type="String">
86 <asp src="images/smilies/tongue.gif" border="0" alt="">arameter Name="original_titel" Type="String">
87 <asp src="images/smilies/tongue.gif" border="0" alt="">arameter Name="original_text" Type="String">
88 </UpdateParameters>
89 <InsertParameters>
90 <asp src="images/smilies/tongue.gif" border="0" alt="">arameter Name="auteur" Type="String">
91 <asp src="images/smilies/tongue.gif" border="0" alt="">arameter Name="soort" Type="String">
92 <asp src="images/smilies/tongue.gif" border="0" alt="">arameter Name="titel" Type="String">
93 <asp src="images/smilies/tongue.gif" border="0" alt="">arameter Name="text" Type="String">
94 </InsertParameters>
95 </asp:SqlDataSource>
96 </LoggedInTemplate>
97 </asp:LoginView>
98 </asp:Content>
99
 
 Can somebody help me?

View 14 Replies View Related

DataBinding: 'System.Data.DataRowView' Does Not Contain A Property With The Name

Feb 16, 2007

Here's a new one I came across that stumped me for a bit.
DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'xxxx'.
It appears that one of my dropdown menus was referencing the old SqlDataSource1for its data source id.
I had already changed the name of the of the id to something else though.
To fix it, I just updated the reference to the new name.
 
Thought I'd share, just in case
 

View 2 Replies View Related

DataBinding: 'System.Data.DataRowView' Does Not Contain A Property With The Name 'RMID'.

Aug 11, 2006

I m trying to UPDATE database using FormView and SqlDataSource and here is my code:
<asp:SqlDataSource ID="sqlDS1" runat="server" ConnectionString="<%$ ConnectionStrings:myDB %>"UpdateCommand="UPDATE [Consultants] SET [firstName]=@FIRSTNAME,[lastName]=@LASTNAME,[skillCategoryID]=@SKILLCATID,[resourceManagerID]=@RMID,[AMgroupID]=@AMGROUPID,[SkillSet]=@SKILLSET,[statusID]=@STATUSID,[location]=@LOCATION,[comments]=@COMMENTS,[profile]=@PROFILE,[isAvailable]=@ISAVAILABLE,[dateModified]=getdate(),[focusID]=1 WHERE ([id]=@ID)">
<UpdateParameters>
<asp:FormParameter FormField="txtFName" Name="FIRSTNAME" />
<asp:FormParameter FormField="txtLName" Name="LASTNAME" />
<asp:FormParameter FormField="ddlSkillCat" Name="SKILLCATID" />
<asp:FormParameter FormField="ddlRM" Name="RMID" />
<asp:FormParameter FormField="ddlAMGroup" Name="AMGROUPID" />
<asp:FormParameter FormField="txtSkillset" Name="SKILLSET" />
<asp:FormParameter FormField="ddlStatus" Name="STATUSID" Type="Int16" />
<asp:FormParameter FormField="txtLocation" Name="LOCATION" />
<asp:FormParameter FormField="txtComments" Name="COMMENTS"/>
<asp:FormParameter FormField="txtProfile" Name="PROFILE" />
<asp:FormParameter FormField="cbAvailable" Name="ISAVAILABLE" />
<asp:QueryStringParameter Type="Int32"
Name="ID"
QueryStringField="id" />
</UpdateParameters>

</asp:SqlDataSource>
//*******************************************************************
<asp:FormView DefaultMode="Edit" ID="FormView1" runat="server" DataSourceID="sqlDS1" DataKeyNames="id">
<EditItemTemplate>
<tr>
<td class="blacktextbold">
Resource Manager:
</td>
<td class="blacktext">
<asp:DropDownList ID="ddlRM" CssClass="blacktext" runat="server" DataSource="<%#GetRM()%>" DataTextField="RMName" DataValueField="userID" SelectedValue="<%#Bind('RMID')%>" AppendDataBoundItems="true">
<asp:ListItem Value="-1">--Select RM--</asp:ListItem>
</asp:DropDownList>
<asp:CustomValidator ID="cvRM" runat="server" ValidationGroup="gpInsert" ControlToValidate="ddlRM" ClientValidationFunction="validateDropdown" OnServerValidate="servervalidateDropdown" Display="Dynamic" ErrorMessage="Required Field" CssClass="redtextsmallbold" />
</td>
</tr>
//********************************************************
here is my GetRM() function:
protected DataSet GetRM()
{
string strConnection = ConfigurationManager.ConnectionStrings["myDB"].ToString();
SqlConnection objConnection = new SqlConnection(strConnection);
String sqlSkillCats = "SELECT Roles.roleID, Roles.roleName, UsersInRoles.userID, UsersInRoles.roleID AS Expr1, Users.firstName + ' ' + Users.lastName AS RMName, Users.id AS Expr2" +
" FROM Users INNER JOIN" +
" UsersInRoles ON Users.id = UsersInRoles.userID CROSS JOIN" +
" Roles" +
" WHERE (Roles.roleName = 'accountmanager') AND (UsersInRoles.roleID = Roles.roleID) ORDER BY Users.firstName";
SqlDataAdapter objAdapter = new SqlDataAdapter(sqlSkillCats, objConnection);
objConnection.Open();
//ddlDataSet = new DataSet();
try
{
objAdapter.Fill(dsConsultantRM, "ConsultantRM");
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
objConnection.Close();
return dsConsultantRM;
}//******************************************************************
i get this error when i load the page:DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'RMID'.
basically i m trying to UPDATE database using the value selected in the DropDownList, can anyone tell me whats wrong here...PLZ HELP!

View 2 Replies View Related

DataBinding: 'System.Data.DataRowView' Does Not Contain A Property With The Name 'file_ID'.

Sep 16, 2006

HAI guys,i am suneel.i have a problem..please help me..i am binding my datalist.i have set my dtakey field to the primary key of teh database.i am not displaying the primary key(file_id).but i am displaying the other fields in that table.i have set databinder.Eval(container,dataitem."file_name").i have put one delete button in the item template...if i want to build now...i am getting an error.....DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'file_ID'.wat i have to do..please get me the reply..

View 2 Replies View Related

DataBinding: 'System.Data.DataRowView' Does Not Contain A Property With The Name 'Component_Profile_ID'

Mar 22, 2007

Hi,Seems like a lot of people are having a similiar problem that I am having right now, but I am not able to find the solution to it. On the Page_load event, the gridview does display the data from database. When I click a button to insert the same data but different Waste_Profile_Num value, it gives me the databinding error. Component_Profile_ID is declared as an Identity and it is the primary key to the table. Anyway help???Ok, the following are code that I have:  1 <asp:SqlDataSource ID="sqlDSMaterialComposition" runat="server" ConnectionString="<%$ ConnectionStrings:HAZConnectionString %>"
2 SelectCommand="SELECT dbo.Component_Profile.Component_Profile_ID AS Component_Profile_ID, dbo.Component.Component, dbo.Component_Profile.Concentration, dbo.Component_Profile.Range, dbo.Component_Profile.Waste_Profile_Num, dbo.Component.Component_ID FROM dbo.Component INNER JOIN dbo.Component_Profile ON dbo.Component.Component_ID = dbo.Component_Profile.Component_ID WHERE (dbo.Component_Profile.Waste_Profile_Num = @Waste_Profile_Num)">
3 <SelectParameters>
4 <asp:SessionParameter Name="Waste_Profile_Num" SessionField="Waste_Profile_Num" Type="Int32" />
5 </SelectParameters>
6 </asp:SqlDataSource>
7
8
9 <asp:GridView ID="GridViewMaterialComposition"
10 runat="server"
11 DataKeyNames="Component_Profile_ID,Component_ID"
12 AutoGenerateColumns="False" ShowFooter="true">
13 <Columns>
14 <asp:BoundField DataField="Component" HeaderText="Component" SortExpression="Component" FooterText="Total"/>
15 <asp:TemplateField HeaderText="Concentration" FooterStyle-Font-Bold="true">
16 <ItemTemplate>
17 <%# SumConcentration(decimal.Parse(Eval("Concentration").ToString())).tostring("N2") %>
18 </ItemTemplate>
19 <FooterTemplate>
20 <%# GetConcentration().tostring("N2") %>
21 </FooterTemplate>
22 </asp:TemplateField>
23 <asp:BoundField DataField="Range" HeaderText="Range" SortExpression="Range" />
24 <asp:BoundField DataField="Component_Profile_ID" HeaderText="Component_Profile_ID" ReadOnly="True" SortExpression="Component_Profile_ID" Visible="true" />
25 <asp:BoundField DataField="Component_ID" HeaderText="Component_ID" ReadOnly="True" SortExpression="Component_ID" Visible="true"/>
26 <asp:BoundField DataField="Waste_Profile_Num" HeaderText="Waste_Profile_Num" ReadOnly="true" SortExpression="Waste_Profile_Num" Visible="true" />
27 <asp:CommandField ShowEditButton="true" />
28 <asp:TemplateField Visible="false">
29 <ItemTemplate>
30 <asp:Label ID="lblComponentProfileID" runat="Server" Text='<% # Eval("Component_Profile_ID") %>'></asp:Label>
31 <asp:Label ID="lblComponentID" runat="Server" Text='<% # Eval("Component_ID") %>'></asp:Label>
32 </ItemTemplate>
33 </asp:TemplateField>
34 </Columns>
35 </asp:GridView>The following are the code-behind: 1 sqlSelect = "SELECT Range, Concentration, Component_ID FROM Component_Profile WHERE (Component_Profile.Waste_Profile_Num = " & previousWasteProfileNum & ")"
2 sqlDSMaterialComposition.SelectCommand = sqlSelect
3 Try
4 Dim dvComposition As Data.DataView = CType(sqlDSMaterialComposition.Select(DataSourceSelectArguments.Empty), Data.DataView)
5 For Each dr As Data.DataRow In dvComposition.Table.Rows
6 insertSql = "INSERT INTO Component_Profile ([Range], [Concentration], [Component_ID], [Waste_Profile_Num]) "
7 insertSql &= "VALUES (" & dr("Range").ToString.Trim & ", " & dr("Concentration").ToString.Trim & ", " & dr("Component_ID").ToString.Trim & ", " & CInt(Session("Waste_Profile_Num").ToString()) & ")"
8 sqlDSMaterialComposition.InsertCommand = insertSql
9 sqlDSMaterialComposition.Insert()
10 Next
11 Catch ex As Exception
12
13 End Try
    

View 1 Replies View Related

Is Databinding A Good Option In ASP .net To Manage Huge Database...?

Mar 13, 2008

I am actually a newbie to asp.net and i m using ASP.net 3.5 i.e, VWD 2008. i am using it for the first time as my tool to develop a website for my final year project. i am planning to develop an online job recruitment site like www.monster.com. Rigth now i am confused how will i manage my database. i've learned to use databinding concept of SQL SERVER in VWD 2008 but will it be enough to handle such huge # of Job postings and employers and as well as Resumes in pdf of word format? or do i have to create a separate databse in SQL Server and to connect it with my website? i am confused at the moment. please help me in this matter.
Regards,
Jigzy

View 6 Replies View Related

Issue With SSRS Report Exporting To Excel With The Matrix Control Inside The Table Control

Jan 27, 2008

Hi All,
I am placing a Matrix inside the table control for grouping requirements,but when we export the report to the Excel, the contents inside the table cell are ignored. Is there any way to get the full report exported, as per the Requirement.Please help me with this issue.

With Thanks
M.Mahendra

View 5 Replies View Related

Is It Possible To Embbed And Ocx Control On A Report Or Some Sort Of Interactive Control Like A Flash.ocx?

Oct 25, 2007

does any one have and example of how to embedd a flash swf file onto a report.??? Is it possable? any examples would be helpful.

View 1 Replies View Related

Reporting Services From WebBrowser Control - Print = Unable To Load Client Print Control

Mar 20, 2007

UPDATE #2: When it said "Do you want to install Microsoft SQL Server" I said "yes" and that caused it to work. I exited and re-ran and now the print runs w/o the "install SQL Server" (If the prompt had said "Do you want to install the print dialog" we wouldn't be having this discussion...) 





UPDATE: After posting this i discovered that the same thing occurs when attempting to print the report direct from IE6: First a dialog pops up "Do you want to install this software?" Name: Microsoft SQL Server. When I click "Don't Install" I get the dialog "unable to load client print control." Since this happens direct from IE6 I suspect it's browser settings. I'll resume tomorrow and post a followup.







My WinForm C# app integrates Reporting Services by calling them from WebBrowser controls. The problem is attempts to print cause a dialog: "unable to load client print control."

I've read prior posts that say "enable Active-X in your browser" - I don't know how to do that from a WebBrowser control.



Any ideas how to support Reporting Services "Print" from within a WebBrowser control?

RELATED THREADS

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=332145&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=264478&SiteID=1

 

 

View 1 Replies View Related

T-SQL Control Of DTS

Aug 10, 2000

Hi,

I want to be able to alter the filename that my DTS package imports programmactically with a T-SQL stored procedure.

Is this possible, I really dont want to write a VB/COM package just to do this!

Jason

View 1 Replies View Related

.sql Control String

Apr 19, 2007

My development environment includes Visual Web Developer, SQL Server 2005 Express and SQL Server Management Studio Express.  I have a .sql control string that creates a database.  The control string is in my App_Data folder within my web site.  When I use SQL Server Managment Studio Express to run the .sql control string and create the tables etc. it does it in my SQLEXPRESS folder and not in the web.
How do I run the .sql file so it will create the database in my App_Data folder within the web site?
Thanks,
Kyleq

View 1 Replies View Related

Image Control And DB

Sep 15, 2007

I wanna know how to retrieve & insert an image from/to a Sql Server database.
using image control or any other control 
I’ve done that with windows form picture box.
As that was explained in MS tutorials  
Code….
-------------------------------------------Dim ms As New MemoryStreamPictureBox1.Image.Save(ms, PictureBox1.Image.RawFormat)Dim arrImage() As Byte = ms.GetBuffer
ms.Close()   Dim strSQL As String = _            "INSERT INTO Emp (EmpName,EmpSalary,Picture)" & _            "VALUES (@EmpName,@EmpSalary,@Picture)"  Dim cmd As New SqlCommand(strSQL, ConnEmp) With cmd     .Parameters.Add(New SqlParameter("@Picture", _      SqlDbType.Image)).Value = arrImage       .Parameters.Add(New SqlParameter("@EmpName", _       SqlDbType.NVarChar)).Value = txtEmpName.Text        .Parameters.Add(New SqlParameter("@EmpSalary", _        SqlDbType.Decimal)).Value = txtEmpSalary.Text   End With 
 cmd.ExecuteNonQuery()
------------------------------------------- 
But with a web form’s image control I DO NOT know how to do it    
I real appreciate your help 
Thank you
 

View 1 Replies View Related

Sqldatasource Control

Oct 23, 2007

please explain selectparameters and conflict detection property within sqldatasource control
mohsen

View 1 Replies View Related

Sqldatasource Control

May 6, 2008

hi friends,
I created sqldatasource control. In select command i written the query like this  "select * form emp" and bounded in grid.How can I change the query for searching the details according the date wise when i click the search button.
 

View 14 Replies View Related

SqlDataSource Control

Jun 7, 2008

Hello experts
i have a SqlDataSource Control on my web form. Here is the source for the control
<asp:SqlDataSource ID="sqlSearchDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:DbefomsConnectionString %>"
SelectCommand="SELECT [icon], [file_name], [path] FROM [tblfile] WHERE ([file_name] = @file_name)">
<SelectParameters>
<asp:ControlParameter ControlID="txtSearch" DefaultValue="0" Name="file_name" PropertyName="Text"
Type="String" />
</SelectParameters>
</asp:SqlDataSource>
This control displays icon, file_name, path in GridView Control
The problem is How can i store the above field values in an asp.net variable.
Thanks
Regards
Ali

View 1 Replies View Related

Concurrency Control

Apr 6, 2005

Hi! I'm building a web application with ASP.NET, and using MS SQL 2000 for my database server.
How should I do to guarantee the integrity of the data in spite of the concurrent access? Meaning... how can I make sure that more than 1 user can update 1 table at the same time, while no error will occur? Do I need to add some codes at my aspx file? Or do I need to do something to my database? Or do I not have to worry about it?
Thank you.

View 1 Replies View Related

SQLConnection Control

May 18, 2005

If i use the TimeTracker app from the starter kit suite and I enter my SQL connection in the web.config file it works fine,
 
If i build a simple app with just a sqladapter, sqlconnection and dataset control then enter in the page_load procedure
 
sqlDataAdater1.fill(dataset11)
datagrid1.databind()
It keeps giving my errors see below:  I created a connection with the sqlconnection control and used the same userid and password I used in the time tracker stater kit's web config file which works - I have no idea what is going on
 
*** is it better to create the sqlconnection control first then create the sqladapter or vise versa.
Server Error in '/WebApplication2' Application.


Login failed for user 'IssueTrackerUser'.
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 'IssueTrackerUser'.Source Error:



Line 55: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Line 56: 'Put user code to initialize the page here
Line 57: SqlDataAdapter1.Fill(DataSet11)
Line 58: DataGrid1.DataBind()
Line 59: Source File: c:inetpubwwwrootWebApplication2WebForm1.aspx.vb    Line: 57 Stack Trace:



[SqlException: Login failed for user 'IssueTrackerUser'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
WebApplication2.WebForm1.Page_Load(Object sender, EventArgs e) in c:inetpubwwwrootWebApplication2WebForm1.aspx.vb:57
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()



Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
 

View 1 Replies View Related

Using The Sqldatasource Control

Dec 7, 2005

Do you have to use the sqldatasource in conjuction with another control like gridview or dropdown list?
I'd like to check to see if a record exists in one table before inserting data into another.
 
thanks
 

View 1 Replies View Related

SqlDataSource Control

Jan 31, 2006

Hello.I'm new to ASP.NET and trying to write data to a Microsft SQL Server. I have created a SqlDataSource control, which is 'connected' to my SQL server.Now my question is how i can put data in the database throw the control, and read data from it. I've read the site, but it's still unclear for me..Greetings!

View 1 Replies View Related

Control Parameter Help......

May 4, 2006

I'm writing a page to do some reporting off of one of our databases, and I'm using 3 control parameters for my sql query that feeds my datagrid.  2 of the ControlParameters are from dropdownlists, and one is from a RadioButtonList.  The ControlParameters that reference the dropdownlists are both working well, but the one for the RadioButtonList is not. 
The error I am getting is: Exception Details: System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near '@Booga'.  (I changed my ControlParameter name from DateStr to Booga to try to avoid any conflicts with reserved words.)Any ideas?  Here is a snippet of my code:
<form id="form1" runat="server">
<table width="100%">
<tr>
<td style="text-align: center">
<strong>DataCenter</strong></td>
<td style="text-align: center">
<strong>Time Scope</strong></td>
<td style="text-align: center">
<strong>Call Status</strong></td>
</tr>
<tr>
<td style="height: 47px; text-align: center">
<asp:DropDownList ID="DropDownList1" DataSourceID="SqlDataSource2" AutoPostBack="true" DataTextField="LocationName" runat="server" />
</td>
<td style="height: 47px; text-align: center">
<asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="true" Font-Size="Smaller">
<asp:ListItem Selected="True" Value=" 1 = 1 ">All</asp:ListItem>
<asp:ListItem Value="((CAST(CallLog.RecvdDate AS smalldatetime) + 1) >= (CAST(GETDATE() AS smalldatetime)))">Last Day</asp:ListItem>
<asp:ListItem Value="((CAST(CallLog.RecvdDate AS smalldatetime) + 7) >= (CAST(GETDATE() AS smalldatetime)))">Last Week</asp:ListItem>
<asp:ListItem Value="((CAST(CallLog.RecvdDate AS smalldatetime) + 30) >= (CAST(GETDATE() AS smalldatetime)))">Last 30 Days</asp:ListItem>
<asp:ListItem Value="((CAST(CallLog.RecvdDate AS smalldatetime) + 120) >= (CAST(GETDATE() AS smalldatetime)))">Last 120 Days</asp:ListItem>
</asp:RadioButtonList></td>
<td style="height: 47px; text-align: center">
<asp:DropDownList ID="DropDownList2" AutoPostBack="true" runat="server">
<asp:ListItem Selected="True" Value="Open">Open</asp:ListItem>
<asp:ListItem Value="Closed">Closed</asp:ListItem>
</asp:DropDownList></td>
</tr>
</table>
<br />
<p style="text-align: center"><strong>Displaying All Open Tickets</strong><br /></p>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" SelectCommand="SELECT DISTINCT [locationname] FROM [profile]"
ConnectionString="<%$ ConnectionStrings:Heat %>" />
<table width="100%">
<tr width="100%">
<td valign="top" width="100%">
<asp:GridView ID="GridView1" AllowSorting="True" runat="server"
DataSourceID="SqlDataSource1" DataKeyNames="CallID"
AutoGenerateColumns="False" Font-Size="Smaller" Width="100%" >
<Columns>
<asp:CommandField />
<asp:BoundField DataField="CallID" HeaderText="Call ID" ReadOnly="True" SortExpression="CallID" />
<asp:BoundField DataField="CustID" HeaderText="Customer ID" ReadOnly="True" SortExpression="CustID" />
<asp:BoundField DataField="CallType" HeaderText="Call Type" ReadOnly="True" SortExpression="CallType" />
<asp:BoundField DataField="Priority" HeaderText="Priority" ReadOnly="True" SortExpression="Priority" />
<asp:BoundField DataField="Cause" HeaderText="Cause" ReadOnly="True" SortExpression="Cause" />
<asp:BoundField DataField="CallDesc" HeaderText="Call Description" ReadOnly="True" SortExpression="CallDesc" >
<ItemStyle Width=40% />
</asp:BoundField>
<asp:BoundField DataField="RecvdBy" HeaderText="Received By" ReadOnly="True" SortExpression="RecvdBy" />
<asp:BoundField DataField="RecvdDate" HeaderText="Call Date" ReadOnly="True" SortExpression="RecvdDate" >
<ItemStyle Wrap="False" />
</asp:BoundField>
<asp:BoundField DataField="RecvdTime" HeaderText="Call Time" ReadOnly="True" SortExpression="RecvdTime" >
<ItemStyle Wrap="False" />
</asp:BoundField>
</Columns>
</asp:GridView>
 
<asp:SqlDataSource ID="SqlDataSource1" runat="server" SelectCommand="SELECT * FROM CallLog INNER JOIN Profile ON CallLog.CustID = Profile.CustID WHERE (Profile.LocationName = @LocationName) AND (CallLog.CallStatus = @CallStatus) AND @Booga "
ConnectionString="<%$ ConnectionStrings:Heat %>">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1" Name="LocationName" PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="DropDownList2" Name="CallStatus" PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="RadioButtonList1" Name="Booga" PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</td>
</tr>
</table>
<br />
<br />
<br />
<br />
</form>

View 2 Replies View Related

DetailsView Control (Please Help!!!!)

May 14, 2006

Can someone please tell me what I am doing wrong...
I have a simple webform that has contains a GridView and a DetailsView. Once the GridView is populated the user simply selects a record from the list.  The DetailsView is them populated with all of the data from the selected record.
The DetailsView is bound to a SQL DataSource/CustomerData. I have made sure that the DV control has the Edit/Update Command listed.  The user can click the Edit button and successfully edit the fields but when the user clicks the "Update" button I am getting the following message.
Updating is not supported by data source 'CustomerData' unless UpdateCommand is specified
Why isnt the control handling the Update.
Many Thanks!!!!
T
 
 

View 4 Replies View Related

FileUpload Control And MS SQL

Jun 1, 2006

I am trying to use the FileUpload control to save a filename to a SQL database. I'm using the OnUpdating event for my SQLDataSource to add the filename to the UpdateParameters. The OnUpdating event is firing but the FileName doesn't get added to the database. Any pointers as to why that might be would be very helpful.
Here's the code. Thanks much.
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" Title="File Upload Testing" %>
<script runat="server">
Sub Page_Load()
Response.Write("UpdateParameters(0)=" & dsLabel.UpdateParameters(0).Name & "<br />")
Response.Write("UpdateParameters(1)=" & dsLabel.UpdateParameters(1).Name & "<br />")
End Sub

Sub dsLabel_OnUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceCommandEventArgs)
Dim FileUploadControl As FileUpload = DetailsView1.FindControl("FileUpload1")
Dim strFileName As String = FileUploadControl.FileName
dsLabel.UpdateParameters(0).DefaultValue = strFileName
dsLabel.UpdateParameters(1).DefaultValue = Request.QueryString("rgstnID")
Response.Write("dsLabel.UpdateParameters(0).DefaultValue = " & dsLabel.UpdateParameters(0).DefaultValue & "<br />")
Response.Write("dsLabel.UpdateParameters(1).DefaultValue = " & dsLabel.UpdateParameters(1).DefaultValue & "<br />")
End Sub
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<h1>File Upload</h1>
This page should allow me to use the FileUpload Control to save a filename to an MS SQL Database.<br />
<br />
&nbsp;<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False"
DataSourceID="dsLabel" Height="50px" Width="125px">
<Fields>
<asp:TemplateField HeaderText="File" SortExpression="labelName">
<EditItemTemplate>
<asp:FileUpload ID="FileUpload1" runat="server" />
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("labelName") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:CommandField ButtonType="Button" ShowEditButton="True" />
</Fields>
</asp:DetailsView>
<br />
<br />
<asp:SqlDataSource ID="dsLabel" runat="server"
ConnectionString="Data Source=FILESERVER1;Initial Catalog=IM;Integrated Security=True"
OnUpdating="dsLabel_OnUpdating"
ProviderName="System.Data.SqlClient"
SelectCommand="SELECT labelName FROM tblProductRegistration WHERE (registrationID = @registrationID)"
UpdateCommand="UPDATE tblProductRegistration SET labelName = @LabelName WHERE (registrationID = @registrationID)">
<UpdateParameters>
<asp:Parameter ConvertEmptyStringToNull="True" Name="LabelName" />
<asp:QueryStringParameter Type="Int64" Name="registrationID" QueryStringField="rgstnID" />
</UpdateParameters>
<SelectParameters>
<asp:QueryStringParameter Name="registrationID" QueryStringField="rgstnID" />
</SelectParameters>
</asp:SqlDataSource>
</asp:Content>

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved