|
LIQUID NITROGEN
The woods are lovely, dark, and deep
But I have promises to keep
and lines to code before I sleep,
and lines to code before I sleep...
|
|
|
|
|
To quote from the site[^];
SQL Server 2005 Express for Beginners: This video series is designed specifically for SQL Server beginners-individuals who are interested in learning the basics of how to create, manage, and connect to SQL Server Express databases.
There are more short tutorials available on the web, and you can always come back here if you get stuck
I are Troll
|
|
|
|
|
Having successfully installed SQL Server 2008 Express on the server, I found no way to connect to it from the client. "Connection refused" was the message, despite being an Administrator on both machines, and having all protocols enabled. Since I have the Management Studio for SSEx2005 installed on the client, I thought there might be a problem trying to connect because of the version difference. I tried installing the latest 2008 version on the client. No joy there - it won't install if 2005 is present, and the installer advised me to uninstall the older version first.
I did so, then re-ran the installer. Again, failure. The Performance Counters are corrupted - see this article; blah, blah. I checked the article, and it was indeed informative! But the message at the top of the page told me that this procedure doesn't apply to my OS (WinXPSP2). It referred me to the WinXP support page, which contains no equivalent article. That's not a bit surprising from my 15 years experience with Microsoft support.
Since the Web Platform Installer keeps a running account of installation attempts, and subsequent tries resulted in instantaneous failure notices, I decided to wipe the slate clean, hunted down and deleted the log files, and tried again. Another failure, this time because I "have to install SP3 for this product" or some such message. The system requirements page lists SP2 as the highest required for the package.
I've now spent 30 - 40 hours trying to install a product that is intended to lure beginners into buying the whole hog, presumably because it is so easy and useful to use. In the process I've now damaged VS2008 (which installed the 2005 version in the first place) on a virgin XP machine with no customizations - I just allowed the MS defaults when I installed the OS on a clean PC.
All I want to do is create a simple program to track inventory items and the maintenance records for them. But it's become a career just to install the tools to do so. I thought it would be nice to use the latest version of SQL Server to implement the program, but it's looking like that was a big mistake. Now my VS2008 is crippled, with no DB installed, and I have a perfectly functional, but unreachable DB engine running on the server.
By the way, the client has tons of RAM, but very little drive space and no way to improve that situation. The server has a bunch of drive space, but limited RAM, and VS2008 doesn't seem to like Windows Server 2003 very much. That's the reason for the current configuration.
Can anyone suggest a reasonable way out of this dilemma?
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Hello i want to write a where clause that will allow me to separate a table according to different column value. I do not know the values of the column because they are dynamic. I want something else than using a cursor.
|
|
|
|
|
Have a little Google[^]mojo
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I would have replied in a bitter way but the way you gave me the result it was so funny that i took the link thanks , btw i searched but i did not use the same words u did
|
|
|
|
|
That's why it is called mojo, comes from experience and having been down that path before. Good on you for taking the info and getting some value out of it, a lesser person would not have got past the implied insult.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Can I get back to you in a couple of days on the topic?
I are Troll
|
|
|
|
|
Create PROCEDURE [dbo].[WidgetServer_GetAllShopList_FR]
(
@CatalogID nvarchar(max),
@PageSize INT,
@PageIndex INT,
@NoOfPages INT OUTPUT
)
AS
DECLARE @StartRowIndex INT
DECLARE @Delimiter CHAR
DECLARE @iIndex SMALLINT
DECLARE @iCatalogId INT
DECLARE @iNoofPages INT
-- DECLARE @CatalogID nvarchar(max)
--DECLARE @PageSize INT
--DECLARE @PageIndex INT
--DECLARE @NoOfPages INT
-- SET @CatalogID='1,2,3';
-- SET @PageIndex = 1;
-- Set @PageSize = 5;
SET NOCOUNT ON;
SET @StartRowIndex= ((@PageIndex * @PageSize) + 1);
BEGIN
SET @Delimiter = ','
WHILE @CatalogID <> ''
BEGIN
SET @iIndex = CHARINDEX(@Delimiter, @CatalogID)
IF @iIndex > 0
BEGIN
SET @iCatalogId = LEFT(@CatalogID, @iIndex-1)
SET @CatalogID = RIGHT(@CatalogID, LEN(@CatalogID) - @iIndex)
END
ELSE
BEGIN
SET @iCatalogId = @CatalogID
SET @CatalogID = ''
END
BEGIN
SET @iNoofPages = (SELECT ISNULL((SELECT ((COUNT(*) / @Pagesize) + CASE WHEN (COUNT(*) % @Pagesize) > 0 THEN 1 ELSE 0 END)
FROM dbo.Shops INNER JOIN Folder ON Folder.ShopID = Shops.ShopID
INNER JOIN [Catalog] ON Catalog.CatalogID = Folder.CatalogID
WHERE Catalog.CatalogID = (@iCatalogId) AND dbo.Shops.[Status] = 1),0));
END
SELECT Distinct Shops.ShopName_FR as ShopName, Shops.ShopID,Catalog.CatalogID, Catalog.CatalogName_FR as CatalogName, Folder.FolderName_FR as Folder
FROM Catalog INNER JOIN
Folder ON Catalog.CatalogID = Folder.CatalogID INNER JOIN
Shops ON Folder.ShopID = Shops.ShopID Where Catalog.CatalogID = (@iCatalogId)
END
END
In this while looping first we will get NoofPages=4 and then 2
I need to add those to values and get in NoofPages
Can any one tell me how?
Yamuna
|
|
|
|
|
PLEASE use
tags when posting your code.
Are you trying to get the sum of noofpages?
<pre>
Declare
@Var INT
Select @Var = SUM(case statement)
From ....
Print '@Var ' + Convert(varchar(1000),@Var)
|
|
|
|
|
hi
Thanks for your reply
how can we get the NoofPages count here thru when case?
explain in detail.
regards,
Yamuna
|
|
|
|
|
yamunarani wrote: explain in detail.
The new snd codz plz
Sorry if you cannot work it out then I can't help you.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi All
How can i install and configure mssql database server for netwoek?I have a network and all machine is member of domain.How can i make connection through client with server?In the client side i have Xp OS and Server Side XP server 2003.
Plz help me
|
|
|
|
|
Open Surface Area configuration for your server and enable remote connections then clients will be able to connect to it through a valid username and password.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Thanks for reply.I am try to do.
|
|
|
|
|
Sorry to say there is no effect.Still i am hunting how to connect.
Can you provide me how o install MsSQL server on Server machine then configure on client machine document.
Plz help me.
|
|
|
|
|
Persumably you have access to the media for SQL Srver (it does not automatically come with Windows Server 2003, but is a separate product). If so the installation istructions for SQL Server 2008 can be found here[^]. There are similar instructions for each version of SQL Server since SQL 7.0 elsewhere on the same web server. Just navigate to the "SQL Server" node and select the appropriate version.
It is not likely that anyone will be willing to duplicate all of those instructions in a reply to your post, so your best bet is to use the provided link.
|
|
|
|
|
i am inserting two record in data base usin txtReg and txtname using acess database when i run my program it shows following error
Execute Nonquery : Connection properly has not been initialized
here is my code
need help
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb ;
namespace studentManagementSystem1
{
public partial class StudentDetails : Form
{
public OleDbCommand cmd;
public OleDbConnection con;
string connectionString, query;
public StudentDetails()
{
InitializeComponent();
}
private void StudentDetails_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'studmanageDataSet.master' table. You can move, or remove it, as needed.
this.masterTableAdapter.Fill(this.studmanageDataSet.master);
connectionString =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\studentManagementSystem1\studmanage.mdb";
}
private void btnAdd_Click(object sender, EventArgs e)
{
int rows;
query = "INSERT INTO master(RegNo,Name)VALUES(@RegNo,@Name)";
cmd = new OleDbCommand(query, con);
con = new OleDbConnection(this.connectionString);
cmd.Parameters.AddWithValue("@RegNo", txtRegNo.Text );
cmd.Parameters.AddWithValue("@Name", txtName.Text );
try
{
con = new OleDbConnection(this.connectionString);
con.Open();
rows = cmd.ExecuteNonQuery();
if (rows > 0)
{
MessageBox.Show("records inserted successfully");
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
con.Close();
}
}
private void btnEdit_Click(object sender, EventArgs e)
{
}
}
}
|
|
|
|
|
I would say just change the order of these two lines from:
cmd = new OleDbCommand(query, con);
con = new OleDbConnection(this.connectionString);
to:
con = new OleDbConnection(this.connectionString);
cmd = new OleDbCommand(query, con);
because you initializing your OleDbCommand (cmd) with a not initilized connection value.
Edit:
I reviewed your code and saw some other things you do wrong.
Your function btnAdd_Click should look like:
private void btnAdd_Click(object sender, EventArgs e)
{
int rows;
query = "INSERT INTO master(RegNo,Name)VALUES(@RegNo,@Name)";
con = null;
try
{
con = new OleDbConnection(this.connectionString);
con.Open();
cmd = new OleDbCommand(query, con);
cmd.Parameters.AddWithValue("@RegNo", txtRegNo.Text );
cmd.Parameters.AddWithValue("@Name", txtName.Text );
rows = cmd.ExecuteNonQuery();
if (rows > 0)
MessageBox.Show("records inserted successfully");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
if(con != null)
con.Close();
}
}
Greetings
Covean
PS: Its a not the best way to do queries in the ui-code.
|
|
|
|
|
Two points:
1. This is a database forum not a c# one which is where your question should go as it's an ADO.Net issue.
2. If you have already started a thread, don't start a new one on exactly the same issue 12 hours later.
Have you even tried using Google to find an answer by searching on the error message?
|
|
|
|
|
1) You have already asked this question in another thread on this forum
2) You have been advised this is not the correct forum for your question
3) It's clear you don't understand what you are doing. Go read a book, then come back and ask any questions in the appropriate forum.
only two letters away from being an asset
|
|
|
|
|
Good Day All
I have a Package created and hosted in a Machine(Theresa) that has SQL 2008 and i have my Development Machine(Vuyiswa) that has IIS and am Debugging from the my machine. i have a ASP.NET 2.0 App and am executing a Package that in another machine. The First thing i did was to share a directory where the Packages are stored when i install the packages and supplied "Everyone","ASP.NET","Vuyiswa" Accounts permissions to to access this share. i can go into the share from the another machine without any problem. i have a code like this in my ASP.NET App
try
{
Application app = new Application();
Package package = null;
package = app.LoadPackage(@"D:\Program Files\Microsoft SQL Server\100\DTS\Packages\OMEGA\OMEGA.dtsx", null);
Variables vars = package.Variables;
vars["Time1"].Value = time;
vars["Time2"].Value = time;
vars["Time3"].Value = time;
vars["TTBLTYPE"].Value = THREAD_DATA[1].ToString();
Microsoft.SqlServer.Dts.Runtime.DTSExecResult results = package.Execute();
if (results == Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure)
{
foreach (Microsoft.SqlServer.Dts.Runtime.DtsError local_DtsError in package.Errors)
{
Console.WriteLine("Package Execution results: {0}", local_DtsError.Description.ToString());
Console.WriteLine();
}
}
}
catch (DtsException ex)
{
Exception = ex.Message;
}
This execute Fine until the
Microsoft.SqlServer.Dts.Runtime.DTSExecResult results = package.Execute();
it does not stop here , but i trap it here
if (results == Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure)
and the Error am Getting is
"SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D.\r\nAn OLE DB record is available. Source:\"Microsoft SQL Server Native Client 10.0" Hresult: 0x80040E4D Description: "Login failed for user 'sa'
On my Package i use the "sa" credentials and my Protection Level is "Dont Save Sensative"
Thank you
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Does your sql server support sql authentication? It is usually not enabled by default, but must be turned on.
|
|
|
|
|
yes it does. i have resolved this Problem by adding a dts config file. The Problem was that the Connection Manager was not saving the Password. so i had to make sure that is there by Explicitly adding it in the config File.
Thank you for your Reply
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi all,
I used VS2005 with EnumAvailableSqlServers to list all the SQL Server, but when I upgrade to VS Team 2008, EnumAvailableSqlServers does not list SQL 2000 Server in the list.
Imports Microsoft.SqlServer.Management.Smo.SmoApplication
Dim dtServer As DataTable = EnumAvailableSqlServers(False)
Please help me!
Thanks a lot.
|
|
|
|