Friday, February 24, 2012
connection could not be established
Im running SQL server 2000 on SBS2k3. I have a couple of databases working
fine and then all of a sudden i was locked out of them when I go to server
enterprise manager with the following msg:
A connection could not be established to <server>
Reason: login failed for user '<domain>\administrator'
Please verify SQL Server is running and check your SQL Server registration
properties and try again.
Could someone please help me. I have checked and the service MSSQL Server
is running.
thank you
MikeMike
Perhasps you have changde a password for this login and your SQL Server was
registered (EM)by an old password.
"Mike Hunt" <ncc4@.hotmail.com> wrote in message
news:%23CXAyyprFHA.3836@.TK2MSFTNGP12.phx.gbl...
> Hi there,
> Im running SQL server 2000 on SBS2k3. I have a couple of databases
> working fine and then all of a sudden i was locked out of them when I go
> to server enterprise manager with the following msg:
> A connection could not be established to <server>
> Reason: login failed for user '<domain>\administrator'
> Please verify SQL Server is running and check your SQL Server registration
> properties and try again.
> Could someone please help me. I have checked and the service MSSQL Server
> is running.
> thank you
> Mike
>
connection could not be established
Im running SQL server 2000 on SBS2k3. I have a couple of databases working
fine and then all of a sudden i was locked out of them when I go to server
enterprise manager with the following msg:
A connection could not be established to <server>
Reason: login failed for user '<domain>\administrator'
Please verify SQL Server is running and check your SQL Server registration
properties and try again.
Could someone please help me. I have checked and the service MSSQL Server
is running.
thank you
Mike
Mike
Perhasps you have changde a password for this login and your SQL Server was
registered (EM)by an old password.
"Mike Hunt" <ncc4@.hotmail.com> wrote in message
news:%23CXAyyprFHA.3836@.TK2MSFTNGP12.phx.gbl...
> Hi there,
> Im running SQL server 2000 on SBS2k3. I have a couple of databases
> working fine and then all of a sudden i was locked out of them when I go
> to server enterprise manager with the following msg:
> A connection could not be established to <server>
> Reason: login failed for user '<domain>\administrator'
> Please verify SQL Server is running and check your SQL Server registration
> properties and try again.
> Could someone please help me. I have checked and the service MSSQL Server
> is running.
> thank you
> Mike
>
connection could not be established
Im running SQL server 2000 on SBS2k3. I have a couple of databases working
fine and then all of a sudden i was locked out of them when I go to server
enterprise manager with the following msg:
A connection could not be established to <server>
Reason: login failed for user '<domain>\administrator'
Please verify SQL Server is running and check your SQL Server registration
properties and try again.
Could someone please help me. I have checked and the service MSSQL Server
is running.
thank you
MikeMike
Perhasps you have changde a password for this login and your SQL Server was
registered (EM)by an old password.
"Mike Hunt" <ncc4@.hotmail.com> wrote in message
news:%23CXAyyprFHA.3836@.TK2MSFTNGP12.phx.gbl...
> Hi there,
> Im running SQL server 2000 on SBS2k3. I have a couple of databases
> working fine and then all of a sudden i was locked out of them when I go
> to server enterprise manager with the following msg:
> A connection could not be established to <server>
> Reason: login failed for user '<domain>\administrator'
> Please verify SQL Server is running and check your SQL Server registration
> properties and try again.
> Could someone please help me. I have checked and the service MSSQL Server
> is running.
> thank you
> Mike
>
Sunday, February 19, 2012
Connection between Active Directory and SQL server in VB6
I have a couple VB6 projects in which I need to connect to the SQL
server. Due to security reason I wonder what is the best way to connect
to the SQL server.
I understand using Window Authentication is really a good way to
connect to the SQL server, however, if the # of users grow, I then have
to create a large number of users in the SQL server which is not
preferable.
Instead I wonder if the following is doable:
Can I create security group in Active Directory which allows certain
groups connect to only certain DBs in the SQL server? But how can I do
with the connectionstring when I connect to the SQL server in my VB6
code.
I really wish this is workable. If so, how can I do it? If not, is
there any other suggestion that I can make certain groups of ppl
connect only to certain DBs?
Thanks in advance. Your help would be greatly appreciated.
WandaHi,
kindly check books online> index> search for
Windows NT groups
thanks,
--
Jose de Jesus Jr. Mcp,Mcdba
Data Architect
Sykes Asia (Manila philippines)
MCP #2324787
"wandali@.rogers.com" wrote:
> Hello,
> I have a couple VB6 projects in which I need to connect to the SQL
> server. Due to security reason I wonder what is the best way to connect
> to the SQL server.
> I understand using Window Authentication is really a good way to
> connect to the SQL server, however, if the # of users grow, I then have
> to create a large number of users in the SQL server which is not
> preferable.
> Instead I wonder if the following is doable:
> Can I create security group in Active Directory which allows certain
> groups connect to only certain DBs in the SQL server? But how can I do
> with the connectionstring when I connect to the SQL server in my VB6
> code.
> I really wish this is workable. If so, how can I do it? If not, is
> there any other suggestion that I can make certain groups of ppl
> connect only to certain DBs?
> Thanks in advance. Your help would be greatly appreciated.
> Wanda
>|||Can't find it, can you please provide me a link? Any more help?
Connection between Active Directory and SQL server in VB6
I have a couple VB6 projects in which I need to connect to the SQL
server. Due to security reason I wonder what is the best way to connect
to the SQL server.
I understand using Window Authentication is really a good way to
connect to the SQL server, however, if the # of users grow, I then have
to create a large number of users in the SQL server which is not
preferable.
Instead I wonder if the following is doable:
Can I create security group in Active Directory which allows certain
groups connect to only certain DBs in the SQL server? But how can I do
with the connectionstring when I connect to the SQL server in my VB6
code.
I really wish this is workable. If so, how can I do it? If not, is
there any other suggestion that I can make certain groups of ppl
connect only to certain DBs?
Thanks in advance. Your help would be greatly appreciated.
WandaHi,
kindly check books online> index> search for
Windows NT groups
thanks,
Jose de Jesus Jr. Mcp,Mcdba
Data Architect
Sykes Asia (Manila philippines)
MCP #2324787
"wandali@.rogers.com" wrote:
> Hello,
> I have a couple VB6 projects in which I need to connect to the SQL
> server. Due to security reason I wonder what is the best way to connect
> to the SQL server.
> I understand using Window Authentication is really a good way to
> connect to the SQL server, however, if the # of users grow, I then have
> to create a large number of users in the SQL server which is not
> preferable.
> Instead I wonder if the following is doable:
> Can I create security group in Active Directory which allows certain
> groups connect to only certain DBs in the SQL server? But how can I do
> with the connectionstring when I connect to the SQL server in my VB6
> code.
> I really wish this is workable. If so, how can I do it? If not, is
> there any other suggestion that I can make certain groups of ppl
> connect only to certain DBs?
> Thanks in advance. Your help would be greatly appreciated.
> Wanda
>|||Can't find it, can you please provide me a link? Any more help?
Connection between Active Directory and SQL server in VB6
I have a couple VB6 projects in which I need to connect to the SQL
server. Due to security reason I wonder what is the best way to connect
to the SQL server.
I understand using Window Authentication is really a good way to
connect to the SQL server, however, if the # of users grow, I then have
to create a large number of users in the SQL server which is not
preferable.
Instead I wonder if the following is doable:
Can I create security group in Active Directory which allows certain
groups connect to only certain DBs in the SQL server? But how can I do
with the connectionstring when I connect to the SQL server in my VB6
code.
I really wish this is workable. If so, how can I do it? If not, is
there any other suggestion that I can make certain groups of ppl
connect only to certain DBs?
Thanks in advance. Your help would be greatly appreciated.
Wanda
Hi,
kindly check books online> index> search for
Windows NT groups
thanks,
Jose de Jesus Jr. Mcp,Mcdba
Data Architect
Sykes Asia (Manila philippines)
MCP #2324787
"wandali@.rogers.com" wrote:
> Hello,
> I have a couple VB6 projects in which I need to connect to the SQL
> server. Due to security reason I wonder what is the best way to connect
> to the SQL server.
> I understand using Window Authentication is really a good way to
> connect to the SQL server, however, if the # of users grow, I then have
> to create a large number of users in the SQL server which is not
> preferable.
> Instead I wonder if the following is doable:
> Can I create security group in Active Directory which allows certain
> groups connect to only certain DBs in the SQL server? But how can I do
> with the connectionstring when I connect to the SQL server in my VB6
> code.
> I really wish this is workable. If so, how can I do it? If not, is
> there any other suggestion that I can make certain groups of ppl
> connect only to certain DBs?
> Thanks in advance. Your help would be greatly appreciated.
> Wanda
>
|||Can't find it, can you please provide me a link? Any more help?
Tuesday, February 14, 2012
Connecting to sql2005 using C#
Help... I am new to C# and .net and I am trying to build a insert page with a couple of drop down controls where I pull a categoryID and subcategoryID to populate my dropdown controls from a MS sql2005 express database. I am using a book that only shows how to build the script and access a access database and I am getting this error when trying to pull up the page:
Description:An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message:CS0246: The type or namespace name 'OleDbConnection' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 3: Line 4: <script runat="server" language="C#">Line 5: OleDbConnection objConn = newOleDbConnection(Line 6: "Server=SIMBA\\NETSDK;" +Line 7: "Database=btuniverse;" +
Source File: c:\Inetpub\wwwroot\_addnews.aspx Line: 5
Below is my code and I am not sure what the syntax needs to be when connecting to a ms sql datasource. Thanks in advanced :)
MYCODE:
<%@. Page Language="C#" MasterPageFile="~/main.master" Title="Untitled Page" %>
<script runat="server" language="C#">
OleDbConnection objConn = newOleDbConnection(
"Server=SIMBA\\NETSDK;" +
"Database=btuniverse;" +
"User ID=sa;Password=password");
OleDbCommand objCmd;
OleDbDataReader objRdr;
void Page_Load() {
if (!IsPostBack) {
objConn.Open();
objCmd = new OleDbCommand("SELECT * FROM dbo.tblNewsCategories", objConn);
objRdr = objCmd.ExecuteReader();
ddlCategory.DataSource = objRdr;
ddlCategory.DataValueField = "CategoryID";
ddlCategory.DataTextField = "CategoryName";
ddlCategory.DataBind();
objRdr.Close();
objCmd = new OleDbCommand("SELECT * FROM dbo.tblSubCategories", objConn);
objRdr = objCmd.Executereader();
ddlSubCategory.DataSource = objRdr;
ddlSubCategory.DataValueField = "SubCategoryID";
ddlSubCategory.DataTextField = "SubCategoryName";
ddlSubCategory.DataBind();
objRdr.Close();
objConn.Close();
}
}
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table>
<tr>
<td align="right">Title:</td>
<td align="left"><asp:TextBox ID="txtArticleTitle" CssClass="textbox" runat="server" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtArticleTitle" ErrorMessage="*" runat="server" />
<br />
</td>
<!-- <asp:CompareValidator ID="cvArticleTitle" ControlToValidate="txtArticleTitle" Operator="DataTypeCheck" Type="String" ErrorMessage="No numbers allowed" />-->
</tr>
<tr>
<td align="right"><p>Article Category:</td><td align="left"><asp:DropDownList ID="ddlCategory" CssClass="dropdownmenu" runat="server" /></td>
</tr>
<tr>
<td align="right"><p>Article Sub Category:</td><td align="left"><asp:DropDownList ID="ddlSubCategory" runat="server" /></td>
</tr>
<tr><td align="right">News Article:</td><td align="left"><asp:TextBox ID="txtArticleDesc" CssClass="textbox" Columns="40" Rows="4" TextMode="MultiLine" runat="server" />
<asp:RequiredFieldValidator ID="rfvArticleDesc" ControlToValidate="txtArticleDesc" ErrorMessage="*" runat="server" />
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
<asp:Button ID="btnSubmit" CssClass="button" runat="server" Text="Submit" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
</asp:Content>
Use SQLDBConnection.
Why dont you check out the tutorials on these forums. They have good explanation with sample code too.|||thank you.
Now that I am able to query certail tables and create drop down menus i am getting an error when trying to insert my record:
Exception Details:System.Data.OleDb.OleDbException: Must declare the scalar variable "@.NewsID".
Source Error:
Line 50: objCmd.Parameters.Add("@.ArticleLink", txtArticleLink.Text);
Line 51: objConn.Open();
Line 52: objCmd.ExecuteNonQuery();
Line 53: objConn.Close();
Line 54: Response.Redirect("mynews.aspx");
HERE IS M CODE:
void SubmitNewsArticle(Object s, EventArgs e)
{
objCmd = new System.Data.OleDb.OleDbCommand(
"INSERT INTO tblNews (NewsID, ArticleDate, Title, " +
"CategoryID, SubCategoryID, ArticleDesc, ArticleLink) " +
"VALUES (@.NewsID, @.Title, @.CategoryID, " +
"@.SubCategoryID, @.ArticleDesc, @.ArticleLink)", objConn);
objCmd.Parameters.Add("@.NewsID", 1);
objCmd.Parameters.Add("@.ArticleDate", txtArticleDate.Text);
objCmd.Parameters.Add("@.Title", txtArticleTitle.Text);
objCmd.Parameters.Add("@.CategoryID",
ddlCategory.SelectedItem.Value);
objCmd.Parameters.Add("@.SubCategoryID",
ddlSubCategory.SelectedItem.Value);
objCmd.Parameters.Add("@.ArticleDesc", txtArticleDesc.Text);
objCmd.Parameters.Add("@.ArticleLink", txtArticleLink.Text);
objConn.Open();
objCmd.ExecuteNonQuery();
objConn.Close();
Response.Redirect("mynews.aspx");
}
what am I missing?? sorry for the posts :( so new to C# and .net -- I am a coldfusion web developer (1 year exp)
thanks again in advanced|||looks like you are still using OLEDB connection. What is your backend? SQL Server or Access/something else? Check ifthis articlehelps (its in VB.NET but you could get an idea of how to declare parameters and set the values).