|
how to apply this in a simple way
|
|
|
|
|
Click apply?
Wout Louwers
|
|
|
|
|
What do you mean?
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Rockery - how to apply this without sweating. You're question makes as much sense.
I suggest you do some research, possibly get a minimal understanding (a little more than this question implies) of the subject.
Get hold of SQL Express, make sure you do not have 2005 on your machine and try to install it. Or even get Access from Office professional and play with that.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
There are many ways to do this. For smaller projects you can use SQLite which is free. You can also use Microsoft Access. They are both good for single user use. If you need a server, then you can try MySQL (also free). If you have the money, you can buy a SQL Server (from Microsoft) or Oracle. There are a few other free database servers available.
You probably need to write some programs to interact with the database. SQL is also a good thing to learn, although some people can get by without knowing SQL. I personally know a few who depend on the GUI of Access to do query stuff. You can write programs using VB.NET, C#, C++, or many other languages (such as Perl and PHP).
Hope this answers your question.
|
|
|
|
|
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?
|
|
|
|