Last week when i was trying to access my SharePoint Portal , all it showed me was "Cannot Connect to Configuration Database" . I then checked each and everything related to the configuration of the SharePoint stuff , then found out that the Database "SharePoint_Config" was in SUSPECT mode . Now for solving this kinda issue , just run this script in your SQL Server Management Studio .
EXEC sp_resetstatus ‘SharePoint_Config’
ALTER DATABASE SharePoint_Config SET EMERGENCY
DBCC checkdb(‘SharePoint_Config’)
ALTER DATABASE SharePoint_Config SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB (‘SharePoint_Config’, REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE SharePoint_Config SET MULTI_USER
Hope this helps !
c1ff0cd9-82b6-4dbc-8f09-38533c4cee8a|0|.0
Tags:
sharepoint,
moss,
moss,
2007,
config,
database,
suspect,
sql,
sharepoint,
sharepoint 2007,
windows sharepoint services
Categories:
MOSS 2007
Posted by Talib on May 1, 2010 10:31
Actions:
E-mail |
Permalink |
Comment RSS
Of late, there has been a lot of speculation about AJAX Control Toolkit's AutoComplete Extender. Basically , this control loads the data specific to the entered text..
So now we will see as to how to connect this control to database and fetch the data when the user enters a specific word or phrase.....
AutoComplete.aspx


Now let us see the code for web service that will help us in fetching the data..
AutoComplete.cs
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.Web.Script.Services.ScriptService]
public class AutoComplete : WebService
{
[WebMethod]
public string[] SearchDB(string prefixText, int count)
{
if (count == 0)
{
count = 10;
}
SqlConnection con = new SqlConnection("server=localhost;database=your database;uid=your username;pwd=your pwd");
string str = "select * from table where username like @prefixText";
con.Open();
SqlDataAdapter da = new SqlDataAdapter(str, con);
da.SelectCommand.Parameters.Add("@prefixText", SqlDbType.VarChar, 50).Value = prefixText + "%";
DataSet ds = new DataSet();
da.Fill(ds);
int cnt = ds.Tables[0].Rows.Count;
List items = new List(cnt);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
items.Add(ds.Tables[0].Rows[i]["UserName"].ToString());
}
return items.ToArray();
}
}
Stylesheet.css
/* AutoComplete highlighted item */
.autocomplete_highlightedListItem
{
background-color: #ffff99;
color: black;
padding: 1px;
}
/* AutoComplete item */
.autocomplete_listItem
{
background-color : window;
color : windowtext;
padding : 1px;
}
Now let's check out the result after running the application ..

NOTE:Please do comment regarding the article as it'll help me to write even more specifically..
96f786bb-bddc-4255-b857-756aaf735f75|1|5.0
Tags:
asp.net,
ajax,
.net,
c#,
autocomplete,
extender,
database
Categories:
ASP.NET
Posted by Talib on July 10, 2009 00:24
Actions:
E-mail |
Permalink |
Comment RSS