Sunday, February 26, 2012

DataBinding: System.Data.DataRowView does not contain a property with the name Component_P

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>789 <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 = sqlSelect3Try4 Dim dvCompositionAs Data.DataView =CType(sqlDSMaterialComposition.Select(DataSourceSelectArguments.Empty), Data.DataView)5For Each drAs Data.DataRowIn dvComposition.Table.Rows6 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 = insertSql9 sqlDSMaterialComposition.Insert()10Next11 Catch exAs Exception1213End Try

Hi guys,

that's ok. I have figured that out. I just need to databind the gridview after the for each statement

DataBinding: System.Data.DataRowView does not contain a property with the name

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

Hi eterry,

Is this issue already resolved?

|||Yes it is. Sorry about that.

DataBinding with Insert query problem

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="http://pics.10026.com/?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?

Hi,

instead of doing that in the asp code, you could achieve the same goal in the code behind:

1. Removed the insert parameter 'auteur' for the asp code

2. add in the page load event the following code:

protected void Page_Load(object sender, EventArgs e)
{

SqlParameter param = new SqlParameter("auteur", SqlDbType.NVarChar);
param.Value = Profile.UserName;

SqlDataSource1.InsertParameters.Add(param);
}

It may need some adjustment to meet your needs but I believe you got the idea :)

Cheers,

Yani

|||

Im having the exact same problem and Im a Newbie......i can't send the profile.username into the d.b. Could it be possible to elaborate a bit, my detailsview looks almost identical. I've spent two frustrating days and hope to have this figured out........... is there a way to put it into the sql insert statement?? im not the best coder by far!

Thanks!

|||

i tried using your example but keep getting errors

SqlParameter

param =newSqlParameter("profile",SqlDbType.NVarChar);

param.Value = Profile.UserName;

SqlDataSource1.InsertParameters.Add(param);

it keeps telling me that

Error 1 The best overloaded method match for 'System.Web.UI.WebControls.ParameterCollection.Add(System.Web.UI.WebControls.Parameter)' has some invalid arguments C:\Documents and Settings\Karl\My Documents\Visual Studio 2005\WebSites\WebSite_fitness\Members\diet_journal.aspx.cs 21 9 C:\...\WebSite_fitness\

Error 2 Argument '1': cannot convert from 'System.Data.SqlClient.SqlParameter' to 'string' C:\Documents and Settings\Karl\My Documents\Visual Studio 2005\WebSites\WebSite_fitness\Members\diet_journal.aspx.cs 21 45 C:\...\WebSite_fitness\

im totally helpless and frustrated....please help!!

|||

The SelectParameters collection is not a collection of SqlParameter. Use another overload of the add function:

SqlDataSource1.InsertParameters.Add("profile",Profile.UserName);

Cheers,

Yani

|||

Thanks Yani, appreciate it... im going to try it when I get home. is it possible to use it in the asp detailsview? basically i bind a textbox during insert and have this problem...... either i can set the to text = bind("profile") or text= membership.get()username. The latter returns my username but wont insert it into my table...lol im quite frustrated and my experience is somewhat lacking..... i use the controls kinda out of the box.......

thanks again !

|||

if maybe u can help with the asp aspect...... this is what my code looks like.... i cant get your page load event to work...... can u maybe walk me through step by step... im really having a rough time!

Thanks!!

<%

@.PageLanguage="C#"MasterPageFile="~/Members/MasterPage.master"AutoEventWireup="true"CodeFile="diet_journal.aspx.cs"Inherits="Members_diet_journal"Title="Untitled Page" %>

<

asp:ContentID="Content1"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server"> Diet Journal<br/> <asp:DetailsViewID="DetailsView1"runat="server"AutoGenerateRows="False"DataKeyNames="meal_hist_id_pk"DataSourceID="SqlDataSource1"Height="50px"Style="position: static"Width="125px"DefaultMode="Insert"><Fields><asp:BoundFieldDataField="meal_hist_id_pk"HeaderText="meal_hist_id_pk"InsertVisible="False"ReadOnly="True"SortExpression="meal_hist_id_pk"/><asp:TemplateFieldHeaderText="date"SortExpression="date"><EditItemTemplate><asp:TextBoxID="TextBox2"runat="server"Text='<%# Bind("date") %>'></asp:TextBox></EditItemTemplate><InsertItemTemplate><asp:CalendarID="Calendar1"runat="server"SelectedDate='<%# Bind("date") %>'Style="position: static"></asp:Calendar></InsertItemTemplate><ItemTemplate><asp:LabelID="Label2"runat="server"Text='<%# Bind("date") %>'></asp:Label></ItemTemplate></asp:TemplateField><asp:BoundFieldDataField="meal_des_fk"HeaderText="meal_des_fk"SortExpression="meal_des_fk"/><asp:TemplateFieldHeaderText="profile"SortExpression="profile"><EditItemTemplate><asp:TextBoxID="TextBox1"runat="server"Text='<%# Bind("profile") %>'></asp:TextBox></EditItemTemplate><InsertItemTemplate><asp:TextBoxID="TextBox1"runat="server"Text='<%# bind("profile") %>'></asp:TextBox></InsertItemTemplate><ItemTemplate><asp:LabelID="Label1"runat="server"Text='<%# Bind("profile") %>'></asp:Label></ItemTemplate></asp:TemplateField><asp:BoundFieldDataField="calories"HeaderText="calories"SortExpression="calories"/><asp:BoundFieldDataField="fat"HeaderText="fat"SortExpression="fat"/><asp:BoundFieldDataField="carbs"HeaderText="carbs"SortExpression="carbs"/><asp:BoundFieldDataField="protein"HeaderText="protein"SortExpression="protein"/><asp:BoundFieldDataField="fibre"HeaderText="fibre"SortExpression="fibre"/><asp:CommandFieldShowInsertButton="True"/></Fields></asp:DetailsView><asp:SqlDataSourceID="SqlDataSource1"runat="server"ConflictDetection="CompareAllValues"ConnectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\diet_journal.mdf;Integrated Security=True;User Instance=True"DeleteCommand="DELETE FROM [meal_history] WHERE [meal_hist_id_pk] = @.original_meal_hist_id_pk AND [date] = @.original_date AND [meal_des_fk] = @.original_meal_des_fk AND [profile] = @.original_profile AND [calories] = @.original_calories AND [fat] = @.original_fat AND [carbs] = @.original_carbs AND [protein] = @.original_protein AND [fibre] = @.original_fibre"InsertCommand="INSERT INTO [meal_history] ([date], [meal_des_fk], [profile], [calories], [fat], [carbs], [protein], [fibre]) VALUES (@.date, @.meal_des_fk, @.profile, @.calories, @.fat, @.carbs, @.protein, @.fibre)"OldValuesParameterFormatString="original_{0}"ProviderName="System.Data.SqlClient"SelectCommand="SELECT [meal_hist_id_pk], [date], [meal_des_fk], [profile], [calories], [fat], [carbs], [protein], [fibre] FROM [meal_history]"UpdateCommand="UPDATE [meal_history] SET [date] = @.date, [meal_des_fk] = @.meal_des_fk, [profile] = @.profile, [calories] = @.calories, [fat] = @.fat, [carbs] = @.carbs, [protein] = @.protein, [fibre] = @.fibre WHERE [meal_hist_id_pk] = @.original_meal_hist_id_pk AND [date] = @.original_date AND [meal_des_fk] = @.original_meal_des_fk AND [profile] = @.original_profile AND [calories] = @.original_calories AND [fat] = @.original_fat AND [carbs] = @.original_carbs AND [protein] = @.original_protein AND [fibre] = @.original_fibre"OnSelecting="SqlDataSource1_Selecting"><DeleteParameters><asp:ParameterName="original_meal_hist_id_pk"Type="Int32"/><asp:ParameterName="original_date"Type="DateTime"/><asp:ParameterName="original_meal_des_fk"Type="Int32"/><asp:ParameterName="original_profile"Type="String"/><asp:ParameterName="original_calories"Type="Int32"/><asp:ParameterName="original_fat"Type="Int32"/><asp:ParameterName="original_carbs"Type="Int32"/><asp:ParameterName="original_protein"Type="Int32"/><asp:ParameterName="original_fibre"Type="Int32"/></DeleteParameters><UpdateParameters><asp:ParameterName="date"Type="DateTime"/><asp:ParameterName="meal_des_fk"Type="Int32"/><asp:ParameterName="profile"Type="String"/><asp:ParameterName="calories"Type="Int32"/><asp:ParameterName="fat"Type="Int32"/><asp:ParameterName="carbs"Type="Int32"/><asp:ParameterName="protein"Type="Int32"/><asp:ParameterName="fibre"Type="Int32"/><asp:ParameterName="original_meal_hist_id_pk"Type="Int32"/><asp:ParameterName="original_date"Type="DateTime"/><asp:ParameterName="original_meal_des_fk"Type="Int32"/><asp:ParameterName="original_profile"Type="String"/><asp:ParameterName="original_calories"Type="Int32"/><asp:ParameterName="original_fat"Type="Int32"/><asp:ParameterName="original_carbs"Type="Int32"/><asp:ParameterName="original_protein"Type="Int32"/><asp:ParameterName="original_fibre"Type="Int32"/></UpdateParameters><InsertParameters><asp:ParameterName="date"Type="DateTime"/><asp:ParameterName="meal_des_fk"Type="Int32"/><asp:ParameterName="profile"Type=String/><asp:ParameterName="calories"Type="Int32"/><asp:ParameterName="fat"Type="Int32"/><asp:ParameterName="carbs"Type="Int32"/><asp:ParameterName="protein"Type="Int32"/><asp:ParameterName="fibre"Type="Int32"/></InsertParameters></asp:SqlDataSource><br/>|||

Hi,

when you add parameters from the code behind like this :

SqlDataSource1.InsertParameters.Add("profile",Profile.UserName);

you need to remove the asp tag for that parameter from the aspx page:

<asp:ParameterName="profile"Type=String/>

From <InsertParameters> tag.

Cheers,

Yani

|||Thanks once again yani, I'll be trying that once i get home!! So if i understand correctly, i need to add

SqlDataSource1.InsertParameters.Add("profile",Profile.UserName); inside of the page load event

and remove<asp:ParameterName="profile"Type=String/>....... from the aspx page. For the insert command and values, do i keep @.profile??

also, for my insert template for the textbox...... do i leave it as bind(profile) ?

Thanks a million for taking the time with me, its greatly appreciated...... I'll owe you at least a case of beer!

Karl

|||

Well,

let me try to explain a lil bit more.

So you have for the InsertParameters in the asp code(aspx) sth like:

<InsertParameters>

// some parameters

<asp:ParameterName="profile"Type=String/>

// some parameters

</InsertParameters>

When you compile the whole web site, the aspx pages are parsed and transformed into code, sth like

public class YourPageNameHere: Page

{

// some functions

//

SqlDataSource1.InsertParameters.Add(paramName, paramvalue);

}

but in your case

<asp:ParameterName="profile"Type=String/>

you have not specified the value here.

So it does not know what to put here.

So instead of doing that in the asp code.

you could do it in the code behind.

SqlDataSource1.InsertParameters.Add("profile",Profile.UserName);

(in the page load function);

where Profile object is accessible.

For the insert command and values, do i keep @.profile??

also, for my insert template for the textbox...... do i leave it as bind(profile) ?

In the insert command - it should remain - since it is the pure sql statement. So keep it as is.

For the insert template...i think you should remove it... actually what are you trying to do there ?

to put as parameter @.profile - the name entered in the text box, or the Profile.UserName ?!

If it is the first you could do sth like:

<asp:ControlParameter ControlID="TextBox1" PropertyName="Text" Name="profile" Type="string" />

Where TextBox1 is the ID of the TextBox control that will be used for entering the profile name.

If this does not solve the problem , please clarify what are you trying to accomplish exactly.

Cheers,

Yani

|||

Awesome, your explanation really cleared things up.... thank you for being super patient and so clear on your explanations...... I'll try this as soon as i get home!.... I can't wait to get this up and running!!

Karl

|||

Hi again, I just tried what you had suggested.........

and keep getting this error

Cannot insert the value NULL into column 'profile', table 'C:\DOCUMENTS AND SETTINGS\KARL\MY DOCUMENTS\VISUAL STUDIO 2005\WEBSITES\WEBSITE_FITNESS\APP_DATA\DIET_JOURNAL.MDF.dbo.meal_history'; column does not allow nulls. INSERT fails.
The statement has been terminated.

Im using your page load event like this :

protectedvoid Page_Load(object sender,EventArgs e)

{

newSqlParameter("profile",SqlDbType.NVarChar);

SqlDataSource1.InsertParameters.Add(

"profile", Profile.UserName);

}

and my asp code looks like this:

<%

@.PageLanguage="C#"MasterPageFile="~/Members/MasterPage.master"AutoEventWireup="true"CodeFile="diet_journal.aspx.cs"Inherits="Members_diet_journal"Title="Untitled Page" %>

<

asp:ContentID="Content1"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server"> Diet Journal<br/> <asp:DetailsViewID="DetailsView1"runat="server"AutoGenerateRows="False"DataSourceID="SqlDataSource1"DefaultMode="Insert"Height="50px"Style="position: static"Width="125px"><Fields><asp:TemplateFieldHeaderText="date"SortExpression="date"><EditItemTemplate><asp:TextBoxID="TextBox1"runat="server"Text='<%# Bind("date") %>'></asp:TextBox></EditItemTemplate><InsertItemTemplate><asp:CalendarID="Calendar1"runat="server"SelectedDate='<%# Bind("date") %>'Style="position: static"></asp:Calendar></InsertItemTemplate><ItemTemplate><asp:LabelID="Label1"runat="server"Text='<%# Bind("date") %>'></asp:Label></ItemTemplate></asp:TemplateField><asp:BoundFieldDataField="profile"HeaderText="profile"SortExpression="profile"/><asp:CommandFieldShowInsertButton="True"/></Fields></asp:DetailsView><asp:SqlDataSourceID="SqlDataSource1"runat="server"ConnectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\diet_journal.mdf;Integrated Security=True;User Instance=True"InsertCommand="INSERT INTO meal_history(date, profile) VALUES (@.date, @.profile)"ProviderName="System.Data.SqlClient"SelectCommand="SELECT [date], [profile] FROM [meal_history]">

</asp:SqlDataSource><br/>

</asp:Content>

To make it simple i just want to insert the date and profile.username............. I keep getting the null profile error though ...i dont know why it wont pass my value to the d.b

Im sorry if Im not getting it, I thought I was a little smarter than this but this problem is kicking my butt!!!

Karl

|||

SUCCESS!!! I got it to work, I used your explaination and I went about it a little bit differently

for the page load i used........

SqlDataSource1.InsertParameters.Add(

"profile",Membership.GetUser().UserName);

and it works.....I guess the profile.name wasn't what i needed, but I did remove the other insert parameter from the aspx page....."profile"

Thank you soooooo much ........I didnt realize thatI have so much to learn!

|||

Hi Karl,

it's great you did it on your own :) but not just copying sth from someone that you don't understand.

We all study each day, so there is much left to be learnt ;)

Cheers,

Yani

|||

Very true Yani !!

Thanks again for all the patience and help, it is very much appreciated!

Have a great day,

Karl

DataBinding to radio button

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.

I was able to figure my own solution.

The problem was a null value for the checked property of the radio buttons. I tried adding a default value to Visual Studio and to the database, but neither of those solved the problem.

Inbetween the two lines of code in my earlier post (beginning myLastRow and dsData.Tables respectively), I added:

myLastRow["Male"]=true;

myLastRow["Female"]=false;

Problem solved.

Databinding question

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

I think I would do databinding in a sub that does nothing else but the databinding. I normally do this in a sub called something like sub bindcontrols() or something like that. Then when I need to refresh the data I can just call that sub.|||

Thanks for your reply.

The problem is the databinding is handled by VS and I dont think I have a choice of where it runs.

|||try the following after deleting detailsView.databind() it should refresh the content Hope this helps

Databinding in c# - Important

Hello
All the samples I found are based on datagrid for the child table.
What if I don't want the child records to be displayed in a datagrid, but in
their own data bound controls like "text box, combo & list boxes). And I
want to provide a second level of navigation buttons to traverse those child
records in the child table.
I'm sure this is possible, but I can't seem to find any sample on it.
Please let me know if you can throw any light on it.
Thank You
You can use the BindingContext and the BindingManagerBase classes to
accomplish this... using the Control.DataBindings.Add( , , )
I don't have any sample off of the top of my head but if you put in
BindingContext and BindingManagerBase in google, you'll find some
W.G. Ryan, MVP
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Hemang Shah" <hemang@.hemang.net> wrote in message
news:ToidnScZwb7iqGjcRVn-ow@.rogers.com...
> Hello
> All the samples I found are based on datagrid for the child table.
> What if I don't want the child records to be displayed in a datagrid, but
in
> their own data bound controls like "text box, combo & list boxes). And I
> want to provide a second level of navigation buttons to traverse those
child
> records in the child table.
> I'm sure this is possible, but I can't seem to find any sample on it.
> Please let me know if you can throw any light on it.
> Thank You
>
>
|||Hemang,
It's the same as if you were binding to the grid. When you add the
binding for the control to the child table, you set the data source to the
relation, not to the child table itself.
Hope this helps.
- Nicholas Paldino [.NET/C# MVP]
- mvp@.spam.guard.caspershouse.com
"Hemang Shah" <hemang@.hemang.net> wrote in message
news:ToidnScZwb7iqGjcRVn-ow@.rogers.com...
> Hello
> All the samples I found are based on datagrid for the child table.
> What if I don't want the child records to be displayed in a datagrid, but
> in
> their own data bound controls like "text box, combo & list boxes). And I
> want to provide a second level of navigation buttons to traverse those
> child
> records in the child table.
> I'm sure this is possible, but I can't seem to find any sample on it.
> Please let me know if you can throw any light on it.
> Thank You
>
>

DataBind/DataSource problem

I have this Code:

myConnection.Open()
CommandText = "SELECT * FROM Students ORDER BY Students.firsName"
myCommand = New SqlCommand(CommandText, myConnection)

chooseStudent.DataSource = myCommand.ExecuteReader(CommandBehavior.CloseConnection)

'Here is the problem
chooseStudent.DataTextField = "firsName" + "|" + "familyName"

chooseStudent.DataValueField = "firsName"

chooseStudent.DataBind()

In this code "chooseStudent" is a DropDownList which contain all students name.

I want that the value of each option (ListItem) will be the first name, But I want that the text will be "firstName" + "|" + "familyName".
(Like "Brad|Pit", "Gorge|Bush" and so.....)

How to do it?(1) never do a "select * from".. always write down the list of columns you need xplicitly. in your case do a "SELECT students.firstname,students.lastname FROM Students ORDER BY Students.Firstname"

(2)

chooseStudent.DataTextField = "firsName"& "|"& "familyName"

"&" is the concatenation string in vb.net ( i assumed you are using vb.net since you dont have semicolons at the end of tour strings..and if you are using C# then you have even bigger issues to worry about..)

hth|||I'm using VB.NET but your solution not work

I get this Error message:

Exception Details: System.Web.HttpException: DataBinder.Eval: 'System.Data.Common.DbDataRecord' does not contain a property with the name firsName|familyName|||can you post some code... ?

Databind for default value in INSERT

Hey guys, how can I databind a default value for my textbox in the <InsertItemTemplate>
I tried an Eval but it obviously didnt't work. The data source has a Selectcommand with ID that I thought I could use in the insertitem, but i guess not.

<asp:FormView ID="FormView2" DataSourceID="SqlDataSource1" runat="server">
<InsertItemTemplate>
Test<br />
<asp:TextBox ID="abc" runat="server" Text='<%# Eval("ID") %>' />
</InsertItemTemplate>
</asp:FormView
How can I do this?
thanks

Hi,

first try Bind instead of Eval in this case. If it's really a default value that you don't want the clients to see it's better to use theInserting eventhandler of the SqlDataSource control.

Grz, Kris.

|||

Actually what I want in this case is to have a default value (like PREFIX in this case) + a databind. I could do it in codebind with .select() and assign find the value from the database and assign "thisIDtextbox" that value"


however, since I've already used the value in the ItemTemplate I thought maybe there is a way to just apply that value in a simple way.

As I said, now I do a sqldatasource.select() procedure and find the value to assign the textbox with. Can I do this in a better way??

<asp:FormViewID="FormView1"runat="server"DataSourceID="SqlDataSource1">

<ItemTemplate>

ThisID:

<asp:LabelID="ReceiverIDLabel"runat="server"Text='<%# Bind("ThisID") %>'></asp:Label><br/></ItemTemplate>

<InsertItemTemplate>

ThisID:

<asp:TextBoxID="ThisIDTextBox"runat="server"Text='PREFIX<%# Bind("ThisID") %>'></asp:TextBox><br/><asp:LinkButtonID="InsertButton"runat="server"CausesValidation="True"CommandName="Insert"Text="Insert"/></InsertItemTemplate>

</asp:FormView>

<asp:SqlDataSourceID="SqlDataSource1"runat="server"ConnectionString="<%$ ConnectionStrings:database %>"SelectCommand="SELECT [ThisID] FROM [db1]"/>

Databases: Active tranzactions (_Total)

MS SQL Server 2000:
When I collected performance data about the active tranzactions counter of my SQL server I found that (_Total) instance is very large (>9999999999999) and is not equal to the sum of the partial instances by DBs.
I have SP2 and all security patches installed.
What's wrong?

Thanks!Which way do you collect the data?|||Originally posted by Coolberg
Which way do you collect the data?

As usual:
Programs=>Administrative tools=>Performance=>Performance Logs and Alerts=>Counter Logs=>New Log Settings=>Name=>Add=>SQLServer: Databases=>Active Transactions+Total=>Add=>Start

Databases. SQL, .NET with VB 2k5 xpressss

OOk, here we go...

I need to make a program, that handles a database.
The database needs to be in SQL and i also need to use dot.NET

I chose to use VB to make the program, and so far i have made a basic database using Access as the database handler.

Now im starting on trying to learn SQL, and while there are SO many resources out there to teach me how to control SQL, theres nothing that shows me how to build a front end for the database, and build a program so that a person can create/delete/modify databases, and all the tables and data in the databases themselves.

Im a little bit lost, i dont exactly feel out of my depth, because i know i can work this out, i just need some guidance!

Any help?

"Now im starting on trying to learn SQL, and while there are SO many resources out there to teach me how to control SQL, theres nothing that shows me how to build a front end for the database, and build a program so that a person can create/delete/modify databases, and all the tables and data in the databases themselves."

Access and SQL Server are two TOTALLY DIFFERENT PLATFORMS. Access is great for a "power user", someone one needs a departmental sized database and they need it up and running quickly. Access is also a great tool to begin learning about database, but Access is not SQL or vice-versa...

My perception of your above statements is that you are looking for the "forms builder" component of SQL Server like Access has...sorry my friend no such functionality exists, atleast not right now. Not built into the database product, probably the closest thing would be reporting services and that is for reporting purposes, though I have seen RS wizards use it like a "forms builder" UI to SQL Server lol...

You build a client "forms" front-end to sql server with a variety of tools, but the most common are .Net, pre .Net VB/C++, and pre.Net ASP. You first need to decide if you want your application to be web-based on client/WinForm-based? from there you need to pick a dev tool that supports the application type you wish to create and then get going with it. You connect to SQL Server from these other platforms via a variety of Database Drivers, ADO, ADO.Net, OLEDB, ODBC, etc.

HTH,

Derek

|||did this address your questions? if so please mark an answer.

Databases. SQL, .NET with VB 2k5 xpressss

OOk, here we go...

I need to make a program, that handles a database.
The database needs to be in SQL and i also need to use dot.NET

I chose to use VB to make the program, and so far i have made a basic database using Access as the database handler.

Now im starting on trying to learn SQL, and while there are SO many resources out there to teach me how to control SQL, theres nothing that shows me how to build a front end for the database, and build a program so that a person can create/delete/modify databases, and all the tables and data in the databases themselves.

Im a little bit lost, i dont exactly feel out of my depth, because i know i can work this out, i just need some guidance!

Any help?

"Now im starting on trying to learn SQL, and while there are SO many resources out there to teach me how to control SQL, theres nothing that shows me how to build a front end for the database, and build a program so that a person can create/delete/modify databases, and all the tables and data in the databases themselves."

Access and SQL Server are two TOTALLY DIFFERENT PLATFORMS. Access is great for a "power user", someone one needs a departmental sized database and they need it up and running quickly. Access is also a great tool to begin learning about database, but Access is not SQL or vice-versa...

My perception of your above statements is that you are looking for the "forms builder" component of SQL Server like Access has...sorry my friend no such functionality exists, atleast not right now. Not built into the database product, probably the closest thing would be reporting services and that is for reporting purposes, though I have seen RS wizards use it like a "forms builder" UI to SQL Server lol...

You build a client "forms" front-end to sql server with a variety of tools, but the most common are .Net, pre .Net VB/C++, and pre.Net ASP. You first need to decide if you want your application to be web-based on client/WinForm-based? from there you need to pick a dev tool that supports the application type you wish to create and then get going with it. You connect to SQL Server from these other platforms via a variety of Database Drivers, ADO, ADO.Net, OLEDB, ODBC, etc.

HTH,

Derek

|||did this address your questions? if so please mark an answer.

Databases, logins and jobs on standby server

I have restored my production server master database to the standby server.
I then ran a series of scripts I found at KB246133:
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q246133#4
I found that my standby server showed itself as a remote server. I created
linked servers between standby and production; I executed sp_dropserver
'(production server name)' and then sp_addserver (standby server name).
SP_dropserver resulted in a message that said that logins existed for this
server. When I look in the sysservers table on the standby server I have
two entries: one for the production server and one for the standby server.
I've also created a backup device on both the production and standby server
which are the same. The backup file from production is copied to standby so
that the restore can be done on the standby server.
My scripts to copy the backup file and restore the database work fine from
QA on the standby server. However, when I try to execute them as part of a
job, I get failures. The step which copies the database over says:
Could not relay results of procedure 'CopyDatabase_DukeAccount' from remote
server 'NCNSV1010'. [SQLSTATE 42000] (Error 7221) [SQLSTATE 01000] (Error
7312). The step failed.
I am confused why SQL thinks that NCNSV1010 is the remote server since it is
actually the local server that this job is executing on. Additionally, the
backup file IS actually copied over successfully.
The step which restores the database to the standby server, which is the
local server, from the backup device says:
RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013)
Cannot open backup device
'd:\mssql\backup\dukeaccount\DukeAccount_Full.bak'. Device error or device
off-line. See the SQL Server error log for more details. [SQLSTATE 42000]
(Error 3201). The step failed.
However, when I open the backup device to view contents, the just copied
backup file is visible in it.
Both servers are running W2K SP4, SQL2K SP2 (with security patch) Standard
Edition.
Does anyone have any idea what is wrong here? Do I need to drop the logins
for the (production server name) that exist on the standby server? If I do
that, will I then have to run the process again to transfer the logins? I
can't seem to drop the production server from the sysservers table if they
have logins. I could manually drop it from the table, but I don't know what
repurcussions that may have.
I need to figure this out because I must automate this process to run daily,
then the T-Logs many times a day, and I'll be doing this for quite a few
databases on these machines.
Thanks in advance.
Deborah> I found that my standby server showed itself as a remote server. I
created
> linked servers between standby and production; I executed sp_dropserver
> '(production server name)' and then sp_addserver (standby server name).
Seems you forgot to specify the ,local option to sp_addserver.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Deborah Bohannon" <dbohannon@.nationalDONOTSENDHEREcareanetwork.com> wrote
in message news:eb2bk2FsDHA.1884@.TK2MSFTNGP10.phx.gbl...
> I have restored my production server master database to the standby
server.
> I then ran a series of scripts I found at KB246133:
> http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q246133#4
> I found that my standby server showed itself as a remote server. I
created
> linked servers between standby and production; I executed sp_dropserver
> '(production server name)' and then sp_addserver (standby server name).
> SP_dropserver resulted in a message that said that logins existed for this
> server. When I look in the sysservers table on the standby server I have
> two entries: one for the production server and one for the standby
server.
> I've also created a backup device on both the production and standby
server
> which are the same. The backup file from production is copied to standby
so
> that the restore can be done on the standby server.
> My scripts to copy the backup file and restore the database work fine from
> QA on the standby server. However, when I try to execute them as part of
a
> job, I get failures. The step which copies the database over says:
> Could not relay results of procedure 'CopyDatabase_DukeAccount' from
remote
> server 'NCNSV1010'. [SQLSTATE 42000] (Error 7221) [SQLSTATE 01000]
(Error
> 7312). The step failed.
> I am confused why SQL thinks that NCNSV1010 is the remote server since it
is
> actually the local server that this job is executing on. Additionally,
the
> backup file IS actually copied over successfully.
> The step which restores the database to the standby server, which is the
> local server, from the backup device says:
> RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013)
> Cannot open backup device
> 'd:\mssql\backup\dukeaccount\DukeAccount_Full.bak'. Device error or device
> off-line. See the SQL Server error log for more details. [SQLSTATE 42000]
> (Error 3201). The step failed.
> However, when I open the backup device to view contents, the just copied
> backup file is visible in it.
> Both servers are running W2K SP4, SQL2K SP2 (with security patch) Standard
> Edition.
> Does anyone have any idea what is wrong here? Do I need to drop the
logins
> for the (production server name) that exist on the standby server? If I
do
> that, will I then have to run the process again to transfer the logins? I
> can't seem to drop the production server from the sysservers table if they
> have logins. I could manually drop it from the table, but I don't know
what
> repurcussions that may have.
> I need to figure this out because I must automate this process to run
daily,
> then the T-Logs many times a day, and I'll be doing this for quite a few
> databases on these machines.
> Thanks in advance.
> Deborah
>
>|||Tibor,
You are absolutely right, I hadn't specified local.
Thank you!
Deborah
"Tibor Karaszi" <tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
wrote in message news:Om179$YsDHA.1996@.TK2MSFTNGP09.phx.gbl...
> > I found that my standby server showed itself as a remote server. I
> created
> > linked servers between standby and production; I executed sp_dropserver
> > '(production server name)' and then sp_addserver (standby server name).
> Seems you forgot to specify the ,local option to sp_addserver.
> --
> Tibor Karaszi, SQL Server MVP
> Archive at:
>
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
>
> "Deborah Bohannon" <dbohannon@.nationalDONOTSENDHEREcareanetwork.com> wrote
> in message news:eb2bk2FsDHA.1884@.TK2MSFTNGP10.phx.gbl...
> > I have restored my production server master database to the standby
> server.
> > I then ran a series of scripts I found at KB246133:
> > http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q246133#4
> >
> > I found that my standby server showed itself as a remote server. I
> created
> > linked servers between standby and production; I executed sp_dropserver
> > '(production server name)' and then sp_addserver (standby server name).
> > SP_dropserver resulted in a message that said that logins existed for
this
> > server. When I look in the sysservers table on the standby server I
have
> > two entries: one for the production server and one for the standby
> server.
> >
> > I've also created a backup device on both the production and standby
> server
> > which are the same. The backup file from production is copied to
standby
> so
> > that the restore can be done on the standby server.
> >
> > My scripts to copy the backup file and restore the database work fine
from
> > QA on the standby server. However, when I try to execute them as part
of
> a
> > job, I get failures. The step which copies the database over says:
> >
> > Could not relay results of procedure 'CopyDatabase_DukeAccount' from
> remote
> > server 'NCNSV1010'. [SQLSTATE 42000] (Error 7221) [SQLSTATE 01000]
> (Error
> > 7312). The step failed.
> >
> > I am confused why SQL thinks that NCNSV1010 is the remote server since
it
> is
> > actually the local server that this job is executing on. Additionally,
> the
> > backup file IS actually copied over successfully.
> >
> > The step which restores the database to the standby server, which is the
> > local server, from the backup device says:
> >
> > RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000] (Error
3013)
> > Cannot open backup device
> > 'd:\mssql\backup\dukeaccount\DukeAccount_Full.bak'. Device error or
device
> > off-line. See the SQL Server error log for more details. [SQLSTATE
42000]
> > (Error 3201). The step failed.
> >
> > However, when I open the backup device to view contents, the just copied
> > backup file is visible in it.
> >
> > Both servers are running W2K SP4, SQL2K SP2 (with security patch)
Standard
> > Edition.
> >
> > Does anyone have any idea what is wrong here? Do I need to drop the
> logins
> > for the (production server name) that exist on the standby server? If I
> do
> > that, will I then have to run the process again to transfer the logins?
I
> > can't seem to drop the production server from the sysservers table if
they
> > have logins. I could manually drop it from the table, but I don't know
> what
> > repurcussions that may have.
> >
> > I need to figure this out because I must automate this process to run
> daily,
> > then the T-Logs many times a day, and I'll be doing this for quite a few
> > databases on these machines.
> >
> > Thanks in advance.
> > Deborah
> >
> >
> >
>

Databases with simple recovery is NOT excluded when backing up logs

SQL 2005 SP2:
I have several Sharepoint databases, all in full recovery mode except the
large search database which I want to run in simple mode because of the
large amount of transactions and because data recovery is not needed.
The back up log task in SQL Server Managment Studio is said to automatically
exclude databases in simple recovery mode, but it doesen't - anyone having a
workaround?
Other users reported that this problem was introduced in SP2, see
http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=1336939&SiteID=17
Here's how I reproduce the error:
When I edit a maintenance plan which backs up transaction logs, I can select
"Database(s)":
At the top of the window it says after the yellow exclamation mark:
"Databases with simple recovery will be excluded". Here I select "All user
databases". (I want to use "All user databases" so that any Sharepoint
databases created in the future are automatically included in this task.)
Back at the "Back up Database Task", when using the button "View T-SQL" i
see that the database in simple mode is not included - as expected.
But when the task is run, it fails. That is, it does what it is expected
to - it backs up all logs except from the database in simple mode, but it
returns an error; where I expected it to run with out error.
When looking in the job log in MSSQL\LOG, it shows that the reason of the
error is that it tried to backup the log from the database in simple
recovery mode - which the GUI said was excluded from the task.
"Failed:(0) Database 'SharedServices1_Search_DB' will not be backed up
because it does not have its recovery model set to Full or BulkLogged."
Regards,
Peter
www.skov.comHi Peter, I have confirmed that this issue happens and have filed a Connect
item. Please vote and add any other pertinent information.
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=320914
"Peter" <pafpaf@.hotmail.com> wrote in message
news:urIlQygTIHA.536@.TK2MSFTNGP06.phx.gbl...
> SQL 2005 SP2:
> I have several Sharepoint databases, all in full recovery mode except the
> large search database which I want to run in simple mode because of the
> large amount of transactions and because data recovery is not needed.
> The back up log task in SQL Server Managment Studio is said to
> automatically exclude databases in simple recovery mode, but it doesen't -
> anyone having a workaround?
> Other users reported that this problem was introduced in SP2, see
> http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=1336939&SiteID=17
> Here's how I reproduce the error:
> When I edit a maintenance plan which backs up transaction logs, I can
> select "Database(s)":
> At the top of the window it says after the yellow exclamation mark:
> "Databases with simple recovery will be excluded". Here I select "All user
> databases". (I want to use "All user databases" so that any Sharepoint
> databases created in the future are automatically included in this task.)
> Back at the "Back up Database Task", when using the button "View T-SQL" i
> see that the database in simple mode is not included - as expected.
> But when the task is run, it fails. That is, it does what it is expected
> to - it backs up all logs except from the database in simple mode, but it
> returns an error; where I expected it to run with out error.
> When looking in the job log in MSSQL\LOG, it shows that the reason of the
> error is that it tried to backup the log from the database in simple
> recovery mode - which the GUI said was excluded from the task.
> "Failed:(0) Database 'SharedServices1_Search_DB' will not be backed up
> because it does not have its recovery model set to Full or BulkLogged."
> Regards,
> Peter
> www.skov.com
>
>
>|||I also posted a related item:
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=320918|||Good idea, I was actually thinking exactly the same today when I had the
problem. :-)
Peter
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%23CaJ7%23hTIHA.4880@.TK2MSFTNGP03.phx.gbl...
>I also posted a related item:
> https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=320918
>
...it would be beneficial to be able to examine the T-SQL and possibly amend
or comment out the line(s) that are causing problems

Databases with simple recovery is NOT excluded when backing up logs

SQL 2005 SP2:
I have several Sharepoint databases, all in full recovery mode except the
large search database which I want to run in simple mode because of the
large amount of transactions and because data recovery is not needed.
The back up log task in SQL Server Managment Studio is said to automatically
exclude databases in simple recovery mode, but it doesen't - anyone having a
workaround?
Other users reported that this problem was introduced in SP2, see
http://forums.microsoft.com/TechNet...36939&SiteID=17
Here's how I reproduce the error:
When I edit a maintenance plan which backs up transaction logs, I can select
"Database(s)":
At the top of the window it says after the yellow exclamation mark:
"Databases with simple recovery will be excluded". Here I select "All user
databases". (I want to use "All user databases" so that any Sharepoint
databases created in the future are automatically included in this task.)
Back at the "Back up Database Task", when using the button "View T-SQL" i
see that the database in simple mode is not included - as expected.
But when the task is run, it fails. That is, it does what it is expected
to - it backs up all logs except from the database in simple mode, but it
returns an error; where I expected it to run with out error.
When looking in the job log in MSSQL\LOG, it shows that the reason of the
error is that it tried to backup the log from the database in simple
recovery mode - which the GUI said was excluded from the task.
"Failed0) Database 'SharedServices1_Search_DB' will not be backed up
because it does not have its recovery model set to Full or BulkLogged."
Regards,
Peter
www.skov.comHi Peter, I have confirmed that this issue happens and have filed a Connect
item. Please vote and add any other pertinent information.
https://connect.microsoft.com/SQLSe...=3209
14
"Peter" <pafpaf@.hotmail.com> wrote in message
news:urIlQygTIHA.536@.TK2MSFTNGP06.phx.gbl...
> SQL 2005 SP2:
> I have several Sharepoint databases, all in full recovery mode except the
> large search database which I want to run in simple mode because of the
> large amount of transactions and because data recovery is not needed.
> The back up log task in SQL Server Managment Studio is said to
> automatically exclude databases in simple recovery mode, but it doesen't -
> anyone having a workaround?
> Other users reported that this problem was introduced in SP2, see
> http://forums.microsoft.com/TechNet...36939&SiteID=17
> Here's how I reproduce the error:
> When I edit a maintenance plan which backs up transaction logs, I can
> select "Database(s)":
> At the top of the window it says after the yellow exclamation mark:
> "Databases with simple recovery will be excluded". Here I select "All user
> databases". (I want to use "All user databases" so that any Sharepoint
> databases created in the future are automatically included in this task.)
> Back at the "Back up Database Task", when using the button "View T-SQL" i
> see that the database in simple mode is not included - as expected.
> But when the task is run, it fails. That is, it does what it is expected
> to - it backs up all logs except from the database in simple mode, but it
> returns an error; where I expected it to run with out error.
> When looking in the job log in MSSQL\LOG, it shows that the reason of the
> error is that it tried to backup the log from the database in simple
> recovery mode - which the GUI said was excluded from the task.
> "Failed0) Database 'SharedServices1_Search_DB' will not be backed up
> because it does not have its recovery model set to Full or BulkLogged."
> Regards,
> Peter
> www.skov.com
>
>
>|||I also posted a related item:
https://connect.microsoft.com/SQLSe...=3209
18|||Good idea, I was actually thinking exactly the same today when I had the
problem. :-)
Peter
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in mess
age
news:%23CaJ7%23hTIHA.4880@.TK2MSFTNGP03.phx.gbl...
>I also posted a related item:
> https://connect.microsoft.com/SQLSe...=32
0918
>
...it would be beneficial to be able to examine the T-SQL and possibly amen
d
or comment out the line(s) that are causing problems

Databases with different collation

Hi group,
we have databases now residing on different servers or instances with
different collations. We are considering bringing the databases on the same
server, keeping their respective collation.
Some of our applications access databases with different collations. We
have been using linked server and specifying "Use remote collation" (or
not). But when putting the DBs with different collation on the same server,
you loss this feature. To go over all the applications and specify the
collation on the query statement level is of course too big a task. Is
there a way to do such a blanket declaration on the database level?
Your responses are greatly appreciated.
Quentin
Quentin,
Have you tried using ALTER DATABASE...COLLATE command?
Thanks.
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

Databases with different collation

Hi group,
we have databases now residing on different servers or instances with
different collations. We are considering bringing the databases on the same
server, keeping their respective collation.
Some of our applications access databases with different collations. We
have been using linked server and specifying "Use remote collation" (or
not). But when putting the DBs with different collation on the same server,
you loss this feature. To go over all the applications and specify the
collation on the query statement level is of course too big a task. Is
there a way to do such a blanket declaration on the database level?
Your responses are greatly appreciated.
QuentinQuentin,
Have you tried using ALTER DATABASE...COLLATE command?
Thanks.
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

Databases with different collation

Hi group,
we have databases now residing on different servers or instances with
different collations. We are considering bringing the databases on the same
server, keeping their respective collation.
Some of our applications access databases with different collations. We
have been using linked server and specifying "Use remote collation" (or
not). But when putting the DBs with different collation on the same server,
you loss this feature. To go over all the applications and specify the
collation on the query statement level is of course too big a task. Is
there a way to do such a blanket declaration on the database level?
Your responses are greatly appreciated.
QuentinQuentin,
Have you tried using ALTER DATABASE...COLLATE command?
Thanks.
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

Databases updating simultaneously

Hi,

I have managed to create a second copy of my "live" database, for
software testing purposes.

Inspecting the properties of the new database, everything seems in
order. The logical file name is the same, which I believe is fine, and
the physical database (and log file name) is different.

However, despite the fact that there is no application currently
accessing the "testing" copy, both databases are seemingly being
updated simultanously. I can tell this from the physical file sizes on
the server, which are identical, and growing at the same rate.

Does anyone have any suggestions why this might be happening - and how
I can stop it?

Thanks in anticipation!

PhilRS200Phil (philsowden@.dataservicesltd.co.uk) writes:

Quote:

Originally Posted by

I have managed to create a second copy of my "live" database, for
software testing purposes.
>
Inspecting the properties of the new database, everything seems in
order. The logical file name is the same, which I believe is fine, and
the physical database (and log file name) is different.
>
However, despite the fact that there is no application currently
accessing the "testing" copy, both databases are seemingly being
updated simultanously. I can tell this from the physical file sizes on
the server, which are identical, and growing at the same rate.
>
Does anyone have any suggestions why this might be happening - and how
I can stop it?


It sounds funny to me that you can see the files grow. Autogrow events
on live databases should be rare events and not happen frequently. You
create them with a reasonable initial size, and then you preferrably
increase then while you have a maintenance window. Autogrow during
production should be avoided, as it could cause the database to be
inaccessible while autogrow is in progress.

To tell why your databases grow in parallel would require more knowledge
about your server. Here we are left to wild guesses. Maybe you set up
replication between the databases?

sp_who can tell you if there are any processes in the database at all.
You can use SQL Server Profiler to see if there is any action in the
server.

Which version of SQL Server are you using?

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Databases Syncronization

Hello Sir/Madam,
I need some help from you.I am working as an RA in a real-time
project,on itegration of Emergency medical services with wireless
technolgies, which involves work on databases.
1)I have a problem now, where I need to write a desktop application
which will syncronise 2 databases.

One database(which will be on a mobile ambulance server) should
constantly check for connection with a main database which is on
another server in someother place and should constantly update as well
as pull information from that. In other words both should be in
syncronisation.
2)First of all I do not know what is a desktop apllication and how
does it differ from other applications.

3)Is there any tutorials which would teach me how to do this, how to
write a desktop application for this? I know there are some tools
which will do this for us, but we want an application to be built by
us, so that we can modify it acording to our requirement.I am jus a
begginer in databses, so I dont know about databases to this extent,
so I need your help.

Thank you, It would be of great help if you could even tell me how go
about this.
Soumyamsowmya@.uab.edu (Sowmya Mulukutla) wrote in message news:<91fbf545.0406111019.43d98df8@.posting.google.com>...
> Hello Sir/Madam,
> I need some help from you.I am working as an RA in a real-time
> project,on itegration of Emergency medical services with wireless
> technolgies, which involves work on databases.
> 1)I have a problem now, where I need to write a desktop application
> which will syncronise 2 databases.
> One database(which will be on a mobile ambulance server) should
> constantly check for connection with a main database which is on
> another server in someother place and should constantly update as well
> as pull information from that. In other words both should be in
> syncronisation.
> 2)First of all I do not know what is a desktop apllication and how
> does it differ from other applications.
> 3)Is there any tutorials which would teach me how to do this, how to
> write a desktop application for this? I know there are some tools
> which will do this for us, but we want an application to be built by
> us, so that we can modify it acording to our requirement.I am jus a
> begginer in databses, so I dont know about databases to this extent,
> so I need your help.
> Thank you, It would be of great help if you could even tell me how go
> about this.
> Soumya

Assuming that this is an academic exercise (I notice you're posting
from a .edu address), then I would suggest asking your teachers for
guidance, if they didn't already give you some sources to consult. I
guess that they want you to investigate the issues related to merging
data when update conflicts can arise - in MSSQL2000, merge replication
is one example of this process. You might want to read up on that in
Books Online to see some of the issues to be considered.

Simon

Databases Starting Repeatedly

I have four databases that show up in the database log as
starting over and over again. While this activity is
going on the web based application is unable to connect.
I have checked all available log files for errors but have
not received the first one as of yet.
I need to call on the experts in the field. Have any of
you ever seen this before? If so, what did you do to
correct the problem?
This is SQL Server 2000 Sp3 running on Windows 2000 Sp3
with 2GB of ram and two 2.4 GHZ processors.
I would appreciate anyone's help as this is a show stopper
for me. Thanks in advance.
A portion of log follows.
**********************************************
2003-09-29 09:53:38.42 server Microsoft SQL Server
2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Enterprise Edition on Windows NT 5.0 (Build 2195:
Service Pack 3)
2003-09-29 09:53:38.42 server Copyright (C) 1988-2002
Microsoft Corporation.
2003-09-29 09:53:38.42 server All rights reserved.
2003-09-29 09:53:38.42 server Server Process ID is 996.
2003-09-29 09:53:38.42 server Logging SQL Server
messages in file 'e:\Program Files\Microsoft SQL
Server\MSSQL\log\ERRORLOG'.
2003-09-29 09:53:38.42 server SQL Server is starting at
priority class 'normal'(4 CPUs detected).
2003-09-29 09:53:38.67 server SQL Server configured for
thread mode processing.
2003-09-29 09:53:38.67 server Using dynamic lock
allocation. [2500] Lock Blocks, [5000] Lock Owner Blocks.
2003-09-29 09:53:38.79 server Attempting to initialize
Distributed Transaction Coordinator.
2003-09-29 09:53:40.29 spid3 Starting up
database 'master'.
2003-09-29 09:53:40.74 spid3 Server name is 'HSMDB'.
2003-09-29 09:53:40.74 spid3 Skipping startup of clean
database id 5
2003-09-29 09:53:40.78 spid3 Skipping startup of clean
database id 6
2003-09-29 09:53:40.78 spid3 Skipping startup of clean
database id 7
2003-09-29 09:53:40.78 spid5 Starting up
database 'msdb'.
2003-09-29 09:53:40.78 spid6 Starting up
database 'hsmqa'.
2003-09-29 09:53:40.78 spid7 Starting up
database 'WebTrend'.
2003-09-29 09:53:40.78 server Using 'SSNETLIB.DLL'
version '8.0.760'.
2003-09-29 09:53:40.78 spid8 Starting up
database 'model'.
2003-09-29 09:53:40.78 spid9 Starting up
database 'WebData'.
2003-09-29 09:53:40.78 spid12 Starting up
database 'WebCache'.
2003-09-29 09:53:40.81 spid7 Analysis of
database 'WebTrend' (10) is 100% complete (approximately 0
more seconds)
2003-09-29 09:53:40.85 spid12 Analysis of
database 'WebCache' (12) is 100% complete (approximately 0
more seconds)
2003-09-29 09:53:40.92 server SQL server listening on
TCP, Shared Memory, Named Pipes.
2003-09-29 09:53:40.92 server SQL Server is ready for
client connections
2003-09-29 09:53:40.92 spid8 Clearing tempdb database.
2003-09-29 09:53:41.10 spid8 Starting up
database 'tempdb'.
2003-09-29 09:53:41.21 spid3 Recovery complete.
2003-09-29 09:53:41.21 spid3 SQL global counter
collection task is created.
2003-09-29 09:53:42.45 spid3 Launched startup
procedure 'hbi_unlock_objects'
2003-09-29 09:53:43.40 spid52 Using 'xpsqlbot.dll'
version '2000.80.194' to execute extended stored
procedure 'xp_qv'.
2003-09-29 09:54:26.79 spid53 Using 'xpstar.dll'
version '2000.80.760' to execute extended stored
procedure 'sp_MSgetversion'.
2003-09-29 09:54:30.64 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:54:30.75 spid53 Starting up
database 'hsmtest'.
2003-09-29 09:54:30.84 spid53 Starting up
database 'hsmtrain'.
2003-09-29 09:55:44.43 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:44.53 spid53 Starting up
database 'hsmtest'.
2003-09-29 09:55:44.62 spid53 Starting up
database 'hsmtrain'.
2003-09-29 09:55:45.98 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:46.07 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:46.17 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:46.26 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:46.36 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:46.45 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:46.57 spid53 Starting up
database 'hsmtest'.
2003-09-29 09:55:46.67 spid53 Starting up
database 'hsmtest'.
2003-09-29 09:55:46.76 spid53 Starting up
database 'hsmtest'.
2003-09-29 09:55:46.86 spid53 Starting up
database 'hsmtest'.
2003-09-29 09:55:46.95 spid53 Starting up
database 'hsmtest'.
2003-09-29 09:55:47.04 spid53 Starting up
database 'hsmtest'.
2003-09-29 09:55:47.14 spid53 Starting up
database 'hsmtrain'.
2003-09-29 09:55:47.23 spid53 Starting up
database 'hsmtrain'.
2003-09-29 09:55:47.32 spid53 Starting up
database 'hsmtrain'.
2003-09-29 09:55:47.42 spid53 Starting up
database 'hsmtrain'.
2003-09-29 09:55:47.53 spid53 Starting up
database 'hsmtrain'.
2003-09-29 09:55:47.62 spid53 Starting up
database 'hsmtrain'.
2003-09-29 09:55:47.76 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:47.86 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:47.95 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:50.21 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:50.31 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:50.40 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:50.93 spid53 Starting up
database 'hsmprod'.
2003-09-29 10:00:01.78 spid86 Starting up
database 'hsmtest'.
2003-09-29 10:00:01.87 spid86 Starting up
database 'hsmtrain'.
2003-09-29 10:00:01.98 spid86 Starting up
database 'hsmtest'.
2003-09-29 10:00:02.07 spid86 Starting up
database 'hsmtrain'.
2003-09-29 10:00:02.40 spid87 Starting up
database 'hsmtest'.
2003-09-29 10:00:02.51 spid87 Starting up
database 'hsmtrain'.Hi Thomas,
Such issues tend to be complex and require extensive research. I'd like to
set the right expectations and let you know that it may take a while for us
to help you narrow down the problem.
Please check to see if the "Auto close" is checked in the Option tab in the
property dialog of the database. If so, make sure this option is unchecked
and try to connect to SQL Server again. Does this resolve the problem?
If not, I would like you to provide me with more information regarding this
issue so that I can narrow down it.
Please make sure that the MSSQLServer service, for the SQL Server you are
trying to connect to, is started and running before doing any further
troubleshooting.
1. What do you mean by "the web based application is unable to connect"?
How do you connect SQL Server? Please describe it in detail. Do any error
messages occur?
2. Ping the server using the server name and IP address. See if the request
completes successfully or times out.
3. Can you connect to SQL Server using Query Analyzer? If not, does any
error message occur?
4. What is the MDAC version on the client machine? For more information
regarding how to check the MDAC version, please refer to the following
article:
301202 HOW TO: Check for MDAC Version
http://support.microsoft.com/?id=301202
5. Please provide the complete error log, you can send it at
v-yshao@.microsoft.com
I am standing by for your response.
Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.|||Most probably the autoclose database option turned on.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Thomas Rhodes" <thomas.rhodes@.nghs.com> wrote in message
news:1c7601c386a0$fb9485d0$a001280a@.phx.gbl...
> I have four databases that show up in the database log as
> starting over and over again. While this activity is
> going on the web based application is unable to connect.
> I have checked all available log files for errors but have
> not received the first one as of yet.
> I need to call on the experts in the field. Have any of
> you ever seen this before? If so, what did you do to
> correct the problem?
> This is SQL Server 2000 Sp3 running on Windows 2000 Sp3
> with 2GB of ram and two 2.4 GHZ processors.
> I would appreciate anyone's help as this is a show stopper
> for me. Thanks in advance.
> A portion of log follows.
> **********************************************
> 2003-09-29 09:53:38.42 server Microsoft SQL Server
> 2000 - 8.00.760 (Intel X86)
> Dec 17 2002 14:22:05
> Copyright (c) 1988-2003 Microsoft Corporation
> Enterprise Edition on Windows NT 5.0 (Build 2195:
> Service Pack 3)
> 2003-09-29 09:53:38.42 server Copyright (C) 1988-2002
> Microsoft Corporation.
> 2003-09-29 09:53:38.42 server All rights reserved.
> 2003-09-29 09:53:38.42 server Server Process ID is 996.
> 2003-09-29 09:53:38.42 server Logging SQL Server
> messages in file 'e:\Program Files\Microsoft SQL
> Server\MSSQL\log\ERRORLOG'.
> 2003-09-29 09:53:38.42 server SQL Server is starting at
> priority class 'normal'(4 CPUs detected).
> 2003-09-29 09:53:38.67 server SQL Server configured for
> thread mode processing.
> 2003-09-29 09:53:38.67 server Using dynamic lock
> allocation. [2500] Lock Blocks, [5000] Lock Owner Blocks.
> 2003-09-29 09:53:38.79 server Attempting to initialize
> Distributed Transaction Coordinator.
> 2003-09-29 09:53:40.29 spid3 Starting up
> database 'master'.
> 2003-09-29 09:53:40.74 spid3 Server name is 'HSMDB'.
> 2003-09-29 09:53:40.74 spid3 Skipping startup of clean
> database id 5
> 2003-09-29 09:53:40.78 spid3 Skipping startup of clean
> database id 6
> 2003-09-29 09:53:40.78 spid3 Skipping startup of clean
> database id 7
> 2003-09-29 09:53:40.78 spid5 Starting up
> database 'msdb'.
> 2003-09-29 09:53:40.78 spid6 Starting up
> database 'hsmqa'.
> 2003-09-29 09:53:40.78 spid7 Starting up
> database 'WebTrend'.
> 2003-09-29 09:53:40.78 server Using 'SSNETLIB.DLL'
> version '8.0.760'.
> 2003-09-29 09:53:40.78 spid8 Starting up
> database 'model'.
> 2003-09-29 09:53:40.78 spid9 Starting up
> database 'WebData'.
> 2003-09-29 09:53:40.78 spid12 Starting up
> database 'WebCache'.
> 2003-09-29 09:53:40.81 spid7 Analysis of
> database 'WebTrend' (10) is 100% complete (approximately 0
> more seconds)
> 2003-09-29 09:53:40.85 spid12 Analysis of
> database 'WebCache' (12) is 100% complete (approximately 0
> more seconds)
> 2003-09-29 09:53:40.92 server SQL server listening on
> TCP, Shared Memory, Named Pipes.
> 2003-09-29 09:53:40.92 server SQL Server is ready for
> client connections
> 2003-09-29 09:53:40.92 spid8 Clearing tempdb database.
> 2003-09-29 09:53:41.10 spid8 Starting up
> database 'tempdb'.
> 2003-09-29 09:53:41.21 spid3 Recovery complete.
> 2003-09-29 09:53:41.21 spid3 SQL global counter
> collection task is created.
> 2003-09-29 09:53:42.45 spid3 Launched startup
> procedure 'hbi_unlock_objects'
> 2003-09-29 09:53:43.40 spid52 Using 'xpsqlbot.dll'
> version '2000.80.194' to execute extended stored
> procedure 'xp_qv'.
> 2003-09-29 09:54:26.79 spid53 Using 'xpstar.dll'
> version '2000.80.760' to execute extended stored
> procedure 'sp_MSgetversion'.
> 2003-09-29 09:54:30.64 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:54:30.75 spid53 Starting up
> database 'hsmtest'.
> 2003-09-29 09:54:30.84 spid53 Starting up
> database 'hsmtrain'.
> 2003-09-29 09:55:44.43 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:44.53 spid53 Starting up
> database 'hsmtest'.
> 2003-09-29 09:55:44.62 spid53 Starting up
> database 'hsmtrain'.
> 2003-09-29 09:55:45.98 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:46.07 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:46.17 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:46.26 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:46.36 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:46.45 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:46.57 spid53 Starting up
> database 'hsmtest'.
> 2003-09-29 09:55:46.67 spid53 Starting up
> database 'hsmtest'.
> 2003-09-29 09:55:46.76 spid53 Starting up
> database 'hsmtest'.
> 2003-09-29 09:55:46.86 spid53 Starting up
> database 'hsmtest'.
> 2003-09-29 09:55:46.95 spid53 Starting up
> database 'hsmtest'.
> 2003-09-29 09:55:47.04 spid53 Starting up
> database 'hsmtest'.
> 2003-09-29 09:55:47.14 spid53 Starting up
> database 'hsmtrain'.
> 2003-09-29 09:55:47.23 spid53 Starting up
> database 'hsmtrain'.
> 2003-09-29 09:55:47.32 spid53 Starting up
> database 'hsmtrain'.
> 2003-09-29 09:55:47.42 spid53 Starting up
> database 'hsmtrain'.
> 2003-09-29 09:55:47.53 spid53 Starting up
> database 'hsmtrain'.
> 2003-09-29 09:55:47.62 spid53 Starting up
> database 'hsmtrain'.
> 2003-09-29 09:55:47.76 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:47.86 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:47.95 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:50.21 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:50.31 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:50.40 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:50.93 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 10:00:01.78 spid86 Starting up
> database 'hsmtest'.
> 2003-09-29 10:00:01.87 spid86 Starting up
> database 'hsmtrain'.
> 2003-09-29 10:00:01.98 spid86 Starting up
> database 'hsmtest'.
> 2003-09-29 10:00:02.07 spid86 Starting up
> database 'hsmtrain'.
> 2003-09-29 10:00:02.40 spid87 Starting up
> database 'hsmtest'.
> 2003-09-29 10:00:02.51 spid87 Starting up
> database 'hsmtrain'.|||Michael:
First, Thank you for your reply. I appreciate the
professional level and degree of your response.
Second, yes the Auto Close was set. I have since removed
the check mark. I have several other databases running on
this server in support of the web based application I
mentioned. These other databases started normally and
remained so after I had restarted the server. If I had
given more thought to situation I could have compared the
properties between the problem databases and those that
functioned as expected. The problem ceased yesterday
morning around 10:00am even with the auto close still
set. I suspect the web application connection succeeded
and maintain its connection thereafter.
Just quickly, should others have interest, I'll respond to
your questions.
1. The web application could not connect from the web
application server. This is a separate server from the
database. I am not exactly sure how the vendor connects
to the database in the code behind the pages. No errors
reported back to Internet Explorer except that the page
could not be found. Basically the weblogic web server
could not start without the connection to the database.
2. I did ping all the servers associated with this
application. I receive successful results on all counts.
3. Yes I was able to connect to the database server using
Query Analyzer and was able to query tables and data from
the affected databases.
4. I have the latest MDAC installation that comes with
SQL SP3a.
Again, I thank you for your help.
Thomas
>--Original Message--
>Hi Thomas,
>Such issues tend to be complex and require extensive
research. I'd like to
>set the right expectations and let you know that it may
take a while for us
>to help you narrow down the problem.
>Please check to see if the "Auto close" is checked in the
Option tab in the
>property dialog of the database. If so, make sure this
option is unchecked
>and try to connect to SQL Server again. Does this resolve
the problem?
>If not, I would like you to provide me with more
information regarding this
>issue so that I can narrow down it.
>Please make sure that the MSSQLServer service, for the
SQL Server you are
>trying to connect to, is started and running before doing
any further
>troubleshooting.
>1. What do you mean by "the web based application is
unable to connect"?
>How do you connect SQL Server? Please describe it in
detail. Do any error
>messages occur?
>2. Ping the server using the server name and IP address.
See if the request
>completes successfully or times out.
>3. Can you connect to SQL Server using Query Analyzer? If
not, does any
>error message occur?
>4. What is the MDAC version on the client machine? For
more information
>regarding how to check the MDAC version, please refer to
the following
>article:
>301202 HOW TO: Check for MDAC Version
>http://support.microsoft.com/?id=301202
>5. Please provide the complete error log, you can send it
at
>v-yshao@.microsoft.com
>I am standing by for your response.
>Regards,
>Michael Shao
>Microsoft Online Partner Support
>Get Secure! - www.microsoft.com/security
>This posting is provided "as is" with no warranties and
confers no rights.
>.
>|||Hi Thomas,
Thank you for taking time to write in your experience so that it may help
other customers who may encounter similar issues. As per your previous
post, I am going consider this issue as Resolved. However, should you have
any further questions or concerns, please feel free to send your post here.
I will continue to work with you.
Thanks for using MSDN newsgroup again.
Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Databases show in EM but not in sysdatabases?

I'm managing the back end SQL 2000 instance for a vendors application. The
application allows users to create databases on the fly for testing, etc.
I opened the instance in Enterprise Manager, and noted that the number of
databases had grown to about a dozen (other than the system databases). Hmm,
so being concerned about drive space, etc, I executed a sp_helpdb.
Yikes..only one of the dozen user databases showed in the listing for
sp_helpdb. Checked sysdatabases and sure enough only one user db shows.
But in EM I can open any of the other 11 DB's, open tables from them, view
options, etc etc. So I'm just curious, how can I view them in EM but they
don't show in sysdatabases?
TIA
<*blush*>..Sigh..one of those days. I did a 'Romo'. Time for a brewski.
"Tibor Karaszi" wrote:

> My guess is that you are connecting to different SQL Server instances.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "bill_the_cat" <billthecat@.discussions.microsoft.com> wrote in message
> news:AF04CEDA-BF16-415C-A652-CB7693F2F16D@.microsoft.com...
>

Databases show in EM but not in sysdatabases?

I'm managing the back end SQL 2000 instance for a vendors application. The
application allows users to create databases on the fly for testing, etc.
I opened the instance in Enterprise Manager, and noted that the number of
databases had grown to about a dozen (other than the system databases). Hmm
,
so being concerned about drive space, etc, I executed a sp_helpdb.
Yikes..only one of the dozen user databases showed in the listing for
sp_helpdb. Checked sysdatabases and sure enough only one user db shows.
But in EM I can open any of the other 11 DB's, open tables from them, view
options, etc etc. So I'm just curious, how can I view them in EM but they
don't show in sysdatabases?
TIAMy guess is that you are connecting to different SQL Server instances.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"bill_the_cat" <billthecat@.discussions.microsoft.com> wrote in message
news:AF04CEDA-BF16-415C-A652-CB7693F2F16D@.microsoft.com...
> I'm managing the back end SQL 2000 instance for a vendors application. Th
e
> application allows users to create databases on the fly for testing, etc.
> I opened the instance in Enterprise Manager, and noted that the number of
> databases had grown to about a dozen (other than the system databases). H
mm,
> so being concerned about drive space, etc, I executed a sp_helpdb.
> Yikes..only one of the dozen user databases showed in the listing for
> sp_helpdb. Checked sysdatabases and sure enough only one user db shows.
> But in EM I can open any of the other 11 DB's, open tables from them, view
> options, etc etc. So I'm just curious, how can I view them in EM but they
> don't show in sysdatabases?
> TIA|||<*blush*>..Sigh..one of those days. I did a 'Romo'. Time for a brewski.
"Tibor Karaszi" wrote:

> My guess is that you are connecting to different SQL Server instances.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "bill_the_cat" <billthecat@.discussions.microsoft.com> wrote in message
> news:AF04CEDA-BF16-415C-A652-CB7693F2F16D@.microsoft.com...
>|||Happens to all of us... :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"bill_the_cat" <billthecat@.discussions.microsoft.com> wrote in message
news:DBD746A2-59BE-49C8-90A9-757086DA9412@.microsoft.com...[vbcol=seagreen]
> <*blush*>..Sigh..one of those days. I did a 'Romo'. Time for a brewski.
> "Tibor Karaszi" wrote:
>

Databases Progress

How Can connect tha Progress Databases in DTS?

Google gave me this list: http://www.sqlsummit.com/oledbVen.htm

of companies that offer OLE DB connectors for various systems. 2 of them offer something for progress.

-Jamie

|||

Progress have their own ODBC driver, which may be accessed using the .Net Data Reader source in SSIS, and the ODBC .Net Framework Data Provider

See http://www.psdn.com/library/servlet/KbServlet/download/1102-102-905/odr.pdf

Donald

Databases per Server

All,

I have 2 web applications running on 2 W2K servers. Each server has a local SQL server(2000). We are about to upgrade the servers to Windows 2003. The web applications are running classic ASP and VB COM+ objects. We are going to take the opportunity to seperate SQL from the web server. What will end up with is 2 web servers running the applications and a single database server with 2 databases servering up the data. We will upgrade the SQL2K to SQL2K5.

My question is how will the SQL performance be affected? What's the best place to locate the COM+ objects? What kind of pitfalls do I need to be aware of?

Thanks

BB

Make sure that the consolidated box has suitable hardware to support both apps (memory, disks, processors). Also, remember that now the a failure of the SQL Server will bring down both while if one database starts hogging resources, the other would be adversely affected. Similarly you'll only have one set of system databases so make sure that tempdb is on a fast set of disks.

Certainly one area you may need to check any conflicts arising from any SQL Server configurations that may differ on the current boxes and also any login conflicts. Remember, also that future patches will be applied at the server level and both apps will need to be able to run on the same SQL version.

You are able to run multiple instances on one box which would allow you to allocate resources better to each application or could consider virtual servers which is becoming more and more popular these days.


HTH!

|||

Great advice - thanks!

What about the increase in network traffic. Is there something to do hardware wise? Like adding a second NIC card? Will that even make a difference?

Thanks