|
Hi gharry:
What exactly you want to do? Perhaps if running a old Service Pack, did you try with a newer Service Pack.
That should cause to remedy any of your problems with the current SQLServer instance you are facing.
Deepak
Deepak Kumar Vasudevan
Personal Web: http://vdeepakkumar.netfirms.com/
I Blog At: http://deepak.blogdrive.com/
|
|
|
|
|
The simplest way to reinstall something is to remove it and install it again
I hope you understand...
By the way... visit http://nehe.gamedev.net[^]
|
|
|
|
|
Yo i know that, i am not stupid. But i want to be sure that there are no databases lost when i remove the application.
|
|
|
|
|
The data files won't be lost if you uninstall SQL Server. However, you should have a backup of these already just in case.
When you reinstall SQL Server you will just have to attach these data files to the new instance of SQL Server. However, your logins will be lost as they operated at the server level, not the database level - so users will be orphaned from their login.
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
|
Then you should backup you databases and then proceed as I suggested , or simply stop the server and copy the mdf and ldf files corresponding to you databases you want to backup into a safe location...
I hope you understand...
By the way... visit http://nehe.gamedev.net[^]
|
|
|
|
|
Thanks for the info. Stil dont understand your remark "I hope you understand..." Is it friendly or something else??
|
|
|
|
|
Most certanly friendly, actualy is my signature...all my posted messages have this remark, hope this doesn't upsets you.
I hope you understand...
By the way... visit http://nehe.gamedev.net[^]
|
|
|
|
|
Is there a simple way to duplicate / copy an en entire table?
I am using VC++ / ADO ( Access database) and I need to duplicate tables during the program run. It is my understanding that ALTER will rename but not build a new table.
Thanks for your time and help
Vaclav
|
|
|
|
|
Hello !
I have created two tables in access. The 1st table is "products" and the 2nd is "components". I have also established a relation of one to many using the editor in access. Now, from ASP.NET I wish to read a product, television, and its component, screen. Is it enough to call:
StrCommand = "SELECT TVscreenID FROM products WHERE ID = " + x + " ORDER BY ID"
OleDbDataAdapter da = new OleDbDataAdapter(StrCommand, conn);
da.Fill(ds,"products");
for accessing the details of the component 'screen' which is elaborated within the table components ? how do I access the details of the screen through the member 'TVscreenID' ? GetChild() or something? should I change the sql-string command to relate the both tables ?
|
|
|
|
|
hi,
I have problem in desktop application, how to connect remote sql server in my desktop application.
I have url of that db with user id and password.
Anyone can give guidance how to connect with remote dabase
|
|
|
|
|
You may need the IP address of the Remote Machine then only you can connect to the Remote Server. You cannot use the url name as the server name if your remote machine is a server and configured that machine as a DNS then you may can use the url (doubt).
Vijay V Anand
|
|
|
|
|
|
Adding to the other comment, check that the firewall settings allow for external communication of SQL Server, and that it was installed (in the case of MSDE, I don't know about SQL Server) with DISABLENETWORKPROTOCOL=0 (not default).
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
In a database i use not a automatic index but assign numbers on the fly.
When a record gets deleted that number becoms available.
Is there any sql command to search the database and retrieve that number te be reused. So if the numbers in a row look like 1..4,6....12 i would like to use 5 as the next number.
|
|
|
|
|
SQL Server 2000:
Select top 1 ID+1<br />
from tablename TN<br />
where not exists (Select ID from TableName where ID=TN.ID+1)<br />
order by ID asc
note that the table must have IDs for this statement to work.
|
|
|
|
|
I am not that good into using ASP.NET but i good get the firts available number by executing:
lblCount = KSComm.ExecuteScalar()
But it gives me a error looking like this:
[InvalidCastException: Specified cast is not valid.]
ASP.free_aspx.Page_Load(Object sender, EventArgs e) in C:\Inetpub\KiddinSys\free.aspx:22
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
|
|
|
|
|
gharryh wrote:
lblCount
I'm assuming by the Hungarian notation that you are using that lblCount is a Label . In which case you cannot assign the result of the SQL statment to it because the SQL statement does not return a Label .
lblCount.Text = KSComm.ExecuteScalar().ToString() would work.
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
Please explain Hungarion Notation
|
|
|
|
|
Your variable name was lblCount . It uses Hungarian Notation - that is a way of writing into the variable name the type information. (e.g. the lbl prefix suggests that the variable refers to a Label object.) It was common in languages such as C++. Some ex-C++ programmers continue using it, although the Microsoft guidelines for writing software in .NET applications suggest that you don't use it.
Typically people now only use hugarian notation for user controls so they can differentiate easily between a variable that references the control, and some variable that is being used to hold a value from the control. For example:
lblCount is the control
count is a value that represents a property of the control (typically the Text property). Normally, this is used when extracting the value from the control, or when a value is being generated for the control.
Does this help?
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
drop table tmp
select * into tmp from bpb
select * from bpb
select * from tmp
The result of table bpb and tmp is the same from the query analyzer.
But if I create a stored procedure like :
CREATE PROCEDURE spTest3 AS
drop table tmp
select * into tmp from bpb
select * from bpb
select * from tmp
GO
, the result for table bpb and tmp isn't the same. How could it possible?
<italic>Work hard, Work effectively.
|
|
|
|
|
Hello,
I have a table that contains rows for multiday periods:
ID StartDate EndDate
1 1/1/2005 8:34:53 1/5/2005 16:34:01
2 1/6/2005 9:21:02 1/11/2005 17:00:02
3 1/12/2005 8:00:00 1/12/2005 12:34:56
4 1/12/2005 13:01:00 1/16/2005 17:31:00 I get a date (no time) for the user (say 1/12/2005) and I would like to find all records in which that date is contained. For 1/12/2005, the query should return both records 3 and 4. For 1/9/2005 only record 2 should be returned.
I've looked at the DATEPART function but it returns only one part of the datetime . How can I compare the date without taking into account the time?
Thanks!
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Try this:
DECLARE @Day datetime
SET @Day = '2005/1/12'
SELECT
ID,
StartDate,
EndDate
FROM
[Table]
WHERE
@Day Between
Convert(datetime, DateDiff(dd, 0, StartDate), 1)
And
Convert(datetime, DateDiff(dd, 0, EndDate), 1)
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
Thanks for your answer. I had already fixed it by creating a FUNCTION that basically converted the datetime to a float , FLOOR ed it, and converted again to datetime , and it works nice!
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
I have designed a MS Access 2000 Database which has three tables CUSTOMERS, BOOKINGS & HOLIDAYS to control data entry I have designed three vb.NET Forms. A user is able to SELECT, INSERT, UPDATE and DELETE records on each table.
CUSTOMERS & HOLIDAYS are working fine – no worries. The problem is with the INNER JOIN Table BOOKINGS. The tables are linked by the attribute Coding, the Pk in HOLIDAYS and the Fk in BOOKINGS.
HOLIDAYS table attributes are:
Coding (NUMBER). Pk
Out (DATE)
Return (DATE)
Airport (TEXT)
Country (TEXT)
Destination (TEXT)
Hotel (TEXT)
Rating (NUMBER)
Night (NUMBER)
Price (CURRENCY FIXED)
BOOKINGS table attributes are:
Ref (NUMBER)
CustID (NUMBER)
Coding (NUMBER)
Date (DATE)
Adult (NUMBER)
Child (NUMBER)
Deposit (CURRENCY FIXED)
Balance (CURRENCY)
Cost (CURRENCY)
The Error/Information message, which is just a list, is:
Parameter[0]’Airport’has no default value.
Following in the same syntax is: Country, Destination, Hotel, Night, Out, Price, Rating, and Return
The error message then changes slightly to 'Original_attribute name'.
Parameter[9]'Original_Coding’has no default value.
Then the following are listed as above: Original_Country, Original_Destination, Original_Hotel, Original_Night, Original_Out, Original_Price, Original_Rating, and lastly Original_Return. All the messages return - has no default value???
Note the error message appears on the BOOKINGS UPDATE, although all the attributes mentioned are in the HOLIDAYS table, also the errors are not returned in the order of the attributes in the HOLIDAYS table (see above).
Below is the BOOKINGS UPDATE Statement I have used:
command = "UPDATE BOOKINGS SET Ref = " & txtRef.Text _<br />
& ",CustID = " & txtCustID.Text _<br />
& ", [Coding] = " & txtCoding.Text _<br />
& ", [Date] = '" & txtDate.Text _<br />
& "', Adult = " & txtAdult.Text _<br />
& ", [Child] = " & txtChild.Text _<br />
& ", Deposit = " & txtDeposit.Text _<br />
& ", Balance = " & txtBalance.Text _<br />
& ", Cost = " & txtCost.Text _<br />
& " WHERE Ref = " & txtRef.Text & "" _
It looks to me like an Array problem or the way I have set up the attributes, but what is it and how do I fix it?
I have attached a copy of the actual error message, the Database and the relevant Form for anybody to look at
Any help would be appreciated, thank you in advance.
Regards jetski4419
jetski4419
|
|
|
|