|
1: Is the connection string correct?
2: Do you have the requisite permissions?
3: Check the SQL configuration via the Sql Server Configuration Manager (was called somehting else in 2005: maybe Surface Area something or other) and ensure that it is set up correctly for your installation.
4: AS I recall the error you have listed is quite common: a quick search on Google would yield plenty of results. Here is one I found in about a second: TCP Provider: No connection could be made because the target machine actively refused it [^].Tychotics: take us back to the moon
"Life, for ever dying to be born afresh, for ever young and eager, will presently stand upon this earth as upon a footstool, and stretch out its realm amidst the stars."
H. G. Wells
|
|
|
|
|
1: The connection string is Correct it comes from my webconfig
2: Can you give me more info on this one. Thanks
3: what Configuration needs to be there ? i have SQl 2005 installed and 2008 installed they both use the same port
4: i saw that links and i have Googled
ThanksVuyiswa 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,
currently i m using sql server 2000.
i declared one column as "startdate"
and the value as follows...
startdate="23-Feb-2010 4:00PM"
startdate="24-Feb-2010 4:00PM"
when i query as below i m not getting any record.
select * from tablename where startdate between '23-Feb-2010' and '23-Feb-2010'
can anyone help me? - KARAN
|
|
|
|
|
There aren't any dates between 23 feb 2010 and 23 feb 2010. Thats why youre query doesn't return anything. Try:
select * from tablename where startdate between '23-Feb-2010' and '24-Feb-2010' Wout Louwers
|
|
|
|
|
The idea is good, the suggestion isn't. There still isn't any date between those when treated as exclusive.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|
|
His startdates where:
startdate="23-Feb-2010 4:00PM"
startdate="24-Feb-2010 4:00PM"
So the first one is between the 23th and the 24th, isn't it?Wout Louwers
|
|
|
|
|
sorry, you're right. I would have given an example with a broader range though.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|
|
Read the documentation for your database.
http://www.w3schools.com/sql/sql_between.asp[^] says:
"In some databases, persons with the LastName of "Hansen" or "Pettersen" will not be listed, because the BETWEEN operator only selects fields that are between and excluding the test values).
In other databases, persons with the LastName of "Hansen" or "Pettersen" will be listed, because the BETWEEN operator selects fields that are between and including the test values)."
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|
|
i have gave my start date's. while i remove the timing, its work fine. but when the timing is included it fails. so when i m storing datetime, i always want to do in sepearate way only?
for example want to create columns as... Startdate-StartTime, EndDate-EndTime,MaxDate-MaxTime....??
help me - Karan
|
|
|
|
|
.
No
store date/time information as real DateTime, not as string, not as separate date and time.
But be aware that "between" may or may not exclude the values you specify, i.e. depending on the database "BETWEEN a and b" means "a <= x <= b" or "a < x < b"
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|
|
On Oracle you could try
select * from tablename where trunc(startdate) between '23-Feb-2010' and '23-Feb-2010'
There is likely an equivalent for SQL Server.
[EDIT]
I'd also add that you are asking for a compare between two different database types so an implied conversion will take place. That conversion often causes results to be different than expected. Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
|
|
|
|
|
Try this:
select * from tablename where (datediff(day, startdate, '23-Feb-2010') = 0)
Adam
|
|
|
|
|
Hi All,
I'm working with SQL Anywhere 10 and one of the tables in our database has a password field we are wanting to encrypt in some way.
Is there a quick and easy way to do this? It's just so if anyone looks at the data in the database they can't see users passwords.
Thanks,
Mel
|
|
|
|
|
Hash the values before you insert them into the database. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi Mark,
Thanks for your feedback, do you have an example of that?
Is there not a constraint in sybase or something along those lines that I can apply to the column?
Thanks again,
Mel
|
|
|
|
|
I have two table which are TBL_A and TBL_B.
TBL_A contain two record, TBL_B have no record.
Select ta.Name
From TBL_A ta
I get two record. But If wrote following query
Select ta.Name
From TBL_A ta, TBL_B tb
No any record get, because SQL Server defaultly use CROSS JOIN like this;
Select ta.Name
From TBL_A AS ta CROSS JOIN TBL_B AS tb
How can I close CROSS JOIN. I want to get record when TBL_B also have no record..
Actually I use "where" statement, but if one table have no record on FROM statement so I did not get result related about CROSS JOIN.
|
|
|
|
|
|
Take a look at this Visual Representation of SQL Joins[^], it may help you understand what joins to use and how to use them Never underestimate the power of human stupidity
RAH
|
|
|
|
|
This may help
declare @tblA table(recordA varchar(10))
declare @tblB table(recordB varchar(10) null)
insert into @tblA select 'recA1' union all select 'recA2'
Query:
select a.* from @tblA a full join @tblB b
on a.recordA = b.recordB
Niladri Biswas
|
|
|
|
|
|
Hi All
When i try to install MSDE , i get the error message "The instance name
specified is invalid". On the server i have installed SQL Server 2000.
I am really confuse and i have searched a lot on the net. Kindly
provide me with a solution as its urgent, i will be highly grateful.M.Alizadeh
|
|
|
|
|
If you did a normal install then the instance name should be the name or IP of the server it was installed on. If you installed a specific instance the name of the server should be servername/instancename. Never underestimate the power of human stupidity
RAH
|
|
|
|
|
thanks so much for your reply.
but can you tel me how i can change instance name??
please explain more i am a beginner...M.Alizadeh
|
|
|
|
|
mehrnoosh wrote: please explain more i am a beginner
Then you need to do some research, there are plenty of resources on the web and you should have Books On Line (BOL) with your SQL Server. Use them, research instancename.
I think you need to reinstall if you need to change the instance name but I'm not sure.Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello Friends,
I've a date in string variable i want to convert this string into datetime format(mm/dd/yyyy) but it's giving me an error. Because my date is stored in dd/mm/yyyy but sql analyser require datetime in mm/dd/yyyy.
So please suggest me the way. Here is my example
Declare @str varchar(100),@strDate datetime
Set @str='14/02/2010'--(dd/mm/yyyy)
Set @strDate=@str
Print @strDate
|
|
|
|