|
Hello,
I have no idea anymore
Has someone an idea how I can create a backup of my database in SQL Server Express 2005?
I don't know - there is no tool which provide this function. I also haven't the Enterprise Manager.
Is there someone who can recommend a Backuptool?
Thanks for helping...;)
Christoph Scherff
|
|
|
|
|
Microsoft makes a graphical management tool available, SQL Server Management Studio Express[^]. I believe you should be able to make a backup from there. This is currently a Community Technology Preview release; there should be a final supported release available soon.
Otherwise the built-in solution is the BACKUP DATABASE command.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hello,
Like Mike said about SQL Server Management Studio Express, you right click on the database you'd like to backup, click on Tasks, and then select Backup. At this point you'll see the backup dialog that is similar to Enterprise Manager.
Hope this helps,
Paul
|
|
|
|
|
i have 2 tables A and B.
I want to isert data of one table into another.
these tables have one identity column.
how can i do it using identity_insert on.
|
|
|
|
|
could you explore more about your problem.
try...
insert into A <fields> values ( select <fields> from B) .
|
|
|
|
|
Hi
Dim Command1 As SqlCommand = New SqlCommand("Select Sum (DocSize) AS myDocSize From Document")<br />
Dim MyDocSize As Integer<br />
<br />
Command1.CommandType = CommandType.Text<br />
Command1.Connection = SQLConnection1<br />
myDataSet = New DataSet("myDataSet")<br />
SQLAdapter1.SelectCommand = Command1
This Query returns a value but I am having real trouble working out how to get that figure into a text field in a Label1.Text
The Table has several values that I add up and want the result to be in the Text Label.
New to VB.Net Newer to SQL
Please Help...
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
As your SQL command only returns a single value, there is no need to attempt to get the value into a DataSet.
IDBCommand, which is the interface implemented by SQLCommand, contains a method called ExecuteScalar[^]- this will return the first value in a select list typed as a generic object. Now, as we know your value will be numeric its just a case of casting the return to the correct type. Say your DocSize is int, the SUM value will also be as such.
Dim Command1 As SqlCommand = New SqlCommand("Select Sum (DocSize) AS myDocSize From Document")<br />
Command1.CommandType = CommandType.Text<br />
Command1.Connection = SQLConnection1<br />
SQLConnection1.Open()<br />
Dim MyDocSize As Integer = CType(ommand1.ExecuteScalar(),Integer)<br />
SQLCOnnection1.Close()<br />
-- modified at 6:44 Monday 13th February, 2006
|
|
|
|
|
how to construct a charts(dynamic charts) using sql statement?do i have to create a database as well? can i have example please?thank you~
mijan
|
|
|
|
|
mijan wrote: how to construct a charts(dynamic charts) using sql statement?do i have to create a database as well?
SQL is a declarative language for issuing commands to relational database systems (RDBMS). Though different brands of RDBMS implement their own flavors of SQL, they typically support a standardized usage of a set of commands for retrieving and modifying data.
There are many tools available for dynamically constructing charts from data, be it retrieved from an SQL query or otherwise. For desktop use, there's always Microsoft Excel. If you're making a WinForms or Web application, there are numerous controls out there that perform charting. Google will help you find a bunch.
|
|
|
|
|
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
how to make the sql server setting allow the remote connection?
|
|
|
|
|
pliz help me with this one.im building an application for searching from my database.the searching scheme is either using a dropdown list of name or a spec inserted by user.how can i retreave the data.
|
|
|
|
|
Hi All
New to .Net even newer to SQL.
I need to count a column in a table and add up number of times a value appears.
e.g.
Cat
Cat
Cat
Dog
Dog
Cow
Cat = 3
Dog = 2
Cow = 1
I am writing in VB.Net a reporting tool to query the DB. With this query I want to list each unique value (Cat,Dog,Cow) in a ListView with the corresponding value next to it.
I hope this makes sense....
Thanks
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
You can use GROUP BY to group your result based on the animal, and use COUNT to get the number of animals of the same type, e.g.:
SELECT animal, COUNT(*)<br />
FROM animaltable<br />
GROUP BY animal
It will return something like:
Cat 1
Dog 2
Cow 3
Edbert
Sydney, Australia
"A day without sunshine is like, you know, night."
|
|
|
|
|
Try this
suppose table name is 'table' and column name is 'animal'
select animal,count(animal) from table group by animal
hope yours problem will be solved.
|
|
|
|
|
I need to run a SQL statement in a C# Windows Forms program using SQLDataFillAdapter. I am binding a SQL statement to a DataGrid. I would like to give the user the ability to click a button to kill the SQL statement if it runs to long. I can't figure out how to do it.
If I run the SQL in a separate Thread, the SQL Thread never blocks (i.e. never returns control back to the Main Thread) in order to allow a button click. So this doesn't seem to be the solution.
Has anyone accomplished what I am trying to do or have any advice?
Thanks,
Mark Mokris
|
|
|
|
|
Hi Everybody,
I have read that ADO.net uses disconnected architecture.i.e it gets disconnected from database and gets connected only while updating and retrieving data. If it is true then y do we require to close connection using cn.close.
2) and what is the difference between ASP.net with VB.net and ASP.net with c#. Why is the later one so popular.
Thanking you and waiting for some kind replies.
Bye
Amit
|
|
|
|
|
Amit R wrote: I have read that ADO.net uses disconnected architecture.i.e it gets disconnected from database and gets connected only while updating and retrieving data. If it is true then y do we require to close connection using cn.close.
You don't require to, but it is good practice in my opinion.
Amit R wrote: and what is the difference between ASP.net with VB.net and ASP.net with c#. Why is the later one so popular.
Your second question is off topic for this forum, but anyway.... ASP.NET has no differences between C# and VB.NET. It is the same framework regardless of language. You could write it in Fujitsu COBOL (as it now targets the .NET Framework) if you really wanted to. The only differences are in the languages themselves and on the whole those are relatively minor.
As to why C# appears to be more popular? I can't say I'd noticed. They seem to be fairly evenly matched to me.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
doubt no 1:it is better to close the database after u can accomplish the work,otherwise it leads to some minor errors.
doubt no 2:vb.net is only for windows applications,example to be programmed for LAN or intranet applications only,whereas asp.net is the web application used to create the best features of internet applications.
and web related tasks.
asp.net having powerful features of web services,validation controls,xml etc..
ASP.NET in C# will having better future because c# is the copy of core java,so c# coding supports platform independent.so better to practice asp.net(c#) in SDK environment rather than IDE environment.
m.s.senthil kumar
|
|
|
|
|
after installing MSDE 2000 and Microsoft SQL Web Data Administrator.
i login into Microsoft SQL Web Data Administrator using Windows Integrated option and created an account for sql login.
when i tried to login using newly created account i got the following error.
Invalid username and/or password, you are using a windows login that is not your own, or server does not exist.
what could be the problem?
my os is Windows XP SP2.
|
|
|
|
|
i have aproblem using LIKE and % with stored procedure.
row:
022533228 ahmed shabana
stored procedure:
CREATE PROCEDURE sel_cust_servtel
(
@servtel char(9)
)
AS
select *
from cust
where serv_tele LIKE @servtel
Query:
exec sel_cust_servtel '%2533228' ------> return nothing
exec sel_cust_servtel '%22533228' ------> return the row
that mean it work only for one character which is not supposed to do.
|
|
|
|
|
Because a char type will space pad the value if it is less than the number of characters specified. So your first query will actually be looking for:
'%2533228 '
The solution is to use a varchar .
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
how could i connect my apllication web site i mean with my database engine. I am using SQL Server 2005.i was using express edition and then change it to enterprise edition.it doest connect with my apllication.
|
|
|
|
|
Change the connection string so it points to the new SQL Server.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
sqlConnection1.Open();
listBox1.Items.Clear();
SqlCommand loader = new SqlCommand("SELECT name from employee;", sqlConnection1);
SqlDataReader read = loader.ExecuteReader();
while (read.Read())
{
listBox1.Items.Add(read[0].ToString().Trim());
}
sqlConnection1.Close();
OR This:
sqlConnection1.Open();
listBox1.Items.Clear();
SqlDataAdapter loader = new SqlDataAdapter("SELECT name from employee;", sqlConnection1);
DataSet dataset_for_emp_names = new DataSet();
loader.Fill(dataset_for_emp_names);
for (int i = 0; i < dataset_for_emp_names.Tables[0].Rows.Count; i++)
{
listBox1.Items.Add(dataset_for_emp_names.Tables[0].Rows[i][0].ToString());
}
I know the fastest way to get data from the SQL Server is by a Query but which one is fastest in c# for retriving data the (SQLCommand with SqlDataReader or SQLDataAdapter.Fill())
thanks;)
|
|
|
|
|
Well, it's quite obviously the 1st one.
I wonder how it didn't occurs to you that using an object which will read all employee to fill a complex data structure, then take the first element of this structure is obviously slower than just reading the 1st element, mhh?
|
|
|
|