|
i need to make table that have sounds i need to select sounds from this table to play in background automic in background when the form load and how i stop sound playing
ma_refay
|
|
|
|
|
You can use the TSQL SOUNDEX to evaluate if two string have the same sound.
<br />
SELECT SOUNDEX ('Smith'), SOUNDEX ('Smythe');<br />
<br />
----- ----- <br />
S530 S530 <br />
<br />
(1 row(s) affected)<br />
Look where you want to go not where you don't want to crash.
Bikers Bible
|
|
|
|
|
Sorry the above does not answer you question.
Store sounds as binary data blobs as you would with Images. Search for storing an image in a db and use similar code.
Look where you want to go not where you don't want to crash.
Bikers Bible
|
|
|
|
|
ma_refay wrote: how i stop sound playing
It would help if you gave us some clues, such as what programming language you're using...
Steve S
Developer for hire
|
|
|
|
|
How can i get the date of the day of the system
when i used this statement in the sql biulder of the dataenvironment of vb6
the sql analysis tell me that the error in the date
select * from emp
where hidate=Date();
i use it with () and without it and the problem still please
help
|
|
|
|
|
Your question is not clear. Do you want to get the system date?
if so then you can use getdate() for that purpose.
Best Regards,
Apurva Kaushal
|
|
|
|
|
LEARN_FOR_EVER wrote: help help help help h e l p
This is a useless subject line. Everyone posting a new thread here is looking for help in some form or another. Your subject line should be a brief description of the problem. e.g. "Date in SQL Server"
|
|
|
|
|
LEARN_FOR_EVER wrote: How can i get the date of the day of the system
GETDATE() returns the current date/time.
The rest of your question is not particularly clear. What do you want to do?
|
|
|
|
|
In stored procedure i used a query
"select Password from tblUser where username='User1' and password='Password'
the reselt is 'Password'
But at the backend the value of Password is 'password'
(that is small letters.
Since password validation needs case sensitive validation how am i supposed to used string comparator. Else is there any other option
ItsMe
|
|
|
|
|
If you are using SQL 2005, you can use HashBytes function to calculate a hashing value of password then compare two hashing values.
If you use SQL 2000, you can use BINARY_CHECKSUM function instead of.
|
|
|
|
|
I am using SQL 2000. i this function is quite complicated one. I just wanted to return true by comparing the below string
string1='User1'
string2='User1'
string3='user1' (here the character 'u' is small)
true when string1 and string2 are compared
false when string 3 is compared with either string1 or string2
ItsMe
|
|
|
|
|
select Password <br />
from tblUser <br />
where username='User1' and cast(password as binary)=cast('Password' as binary)
Run this little test in the SQL Query Analyzer:
declare @cTest1 varchar(10)
declare @cTest2 varchar(10)
select @cTest1 = 'test'
select @cTest2 = 'Test'
if (@cTest1 = @cTest2)
print 'They are equal as varchar'
else
print 'They are NOT equal as varchar'
if (cast(@cTest1 as binary) = cast(@cTest2 as binary))
print 'They are equal as binary'
else
print 'They are NOT equal as binary'
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
Your biggest problem is that you are storing plaintext passwords in a dababase table. Any hacker who compromises a single user login will have access to every username and password in the system...
|
|
|
|
|
Hi,
How to cast the following value into datetime.
select CAST('17/01/2006 14:52:48' as DATETIME) --> gives out-of-range datetime value.
|
|
|
|
|
You are nearly there try this
<br />
select Convert(DATETIME, '17/01/2006 14:52:48')<br />
There are options that you can use as well; as described below.
example convertimg German date for today without time
<br />
select Convert(DATETIME, CAST(Day(getdate())as char(2)) + '.' + CAST(Month(getdate()) as char(2)) + '.' + CAST(Year(getdate())as char(4)) , 104)<br />
Without century (yy) (1) With century (yyyy) Standard Input/Output (3)
0 or 100 (1, 2) Default mon dd yyyy hh:miAM (or PM)
1 101 U.S. mm/dd/yyyy
2 102 ANSI yy.mm.dd
3 103 British/French dd/mm/yy
4 104 German dd.mm.yy
5 105 Italian dd-mm-yy
6 106 (1) - dd mon yy
7 107 (1) - Mon dd, yy
8 108 - hh:mm:ss -
9 or 109 (1, 2) Default + milliseconds mon dd yyyy hh:mi:ss:mmmAM (or PM)
10 110 USA mm-dd-yy
11 111 JAPAN yy/mm/dd
12 112 ISO yymmdd
13 or 113 (1, 2) Europe default + milliseconds dd mon yyyy hh:mm:ss:mmm(24h)
14 114 - hh:mi:ss:mmm(24h)
20 or 120 (2) ODBC canonical yyyy-mm-dd hh:mi:ss(24h)
21 or 121 (2) ODBC canonical (with milliseconds) yyyy-mm-dd hh:mi:ss.mmm(24h)
126 (4) ISO8601 yyyy-mm-ddThh:mm:ss.mmm (no spaces)
127(6) ISO8601 with time zone Z. yyyy-mm-ddThh:mm:ss.mmmZ (no spaces)
130 (1, 2) Hijri (5) dd mon yyyy hh:mi:ss:mmmAM
131 (2) Hijri (5) dd/mm/yy hh:mi:ss:mmmAM
-- modified at 7:05 Tuesday 8th August, 2006
Look where you want to go not where you don't want to crash.
Bikers Bible
|
|
|
|
|
For consistent date-time conversion behaviour, always use the ISO format: yyyyMMdd hh:mm:ss. All other formats are subject to the user's current locale setting.
Best practice when passing dates from an application into a query is to use parameterised queries with parameter objects. For example, in ADO.NET with SQL Server, use @name placeholders to mark the parameters, and SqlParameter objects to set the values of the parameters.
|
|
|
|
|
i need to select random row from table in my database to dir the contents of that row every time i dir different row how?!!!!!!!!!!!!!!!!
ma_refay
|
|
|
|
|
You can use newID() if your database is sqlserver for this purpose. It will give you random row from the table.
Best Regards,
Apurva Kaushal
|
|
|
|
|
NEWID() on its own won't give you a random row. It will only give you a new GUID.
|
|
|
|
|
But if we want to get the random row from a particular table then can't we get that with the help of newID().
Best Regards,
Apurva Kaushal
|
|
|
|
|
SELECT TOP 1 * FROM Table1 ORDER BY newid()
|
|
|
|
|
Make as stored procedure:
CREATE PROCEDURE GetRandomRow AS
declare @nRand int
declare @cSQL varchar(200)
select @nRand = 1 + (rand() * (select count(*) from MyTestTable))
select @cSQL = 'SELECT TOP 1 * FROM (SELECT TOP ' + cast(@nRand as varchar)
+ ' * FROM MyTestTable ORDER BY IDColumn ASC) as tbl ORDER BY IDColumn DESC'
exec(@cSQL)
You could send in the table name and ORDER BY field as parameters.
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
Your website is getting so many hits and visitors are running so many queries Temp DB logs starts growing exponentially thus your sites starts slowing down and even crashing. What would be the most effecient way to quickly clear temp DB without restarting the servers. I wrote this script which worked but it took a while, but it helped. Would you use another method is this script the best its gonna get?
DBCC SHRINKFILE(‘YourDataBase_log’)
BACKUP LOG YourDataBase WITH TRUNCATE_ONLY
After that is done if the log files still have not shrunken then I do this:
SET NOCOUNT ON
CREATE TABLE dummy
(a VARCHAR(8000))
WHILE (0 < 1)
BEGIN
INSERT INTO dummy SELECT REPLICATE(‘a’, 8000)
DELETE FROM dummy
END
-- modified at 0:45 Tuesday 8th August, 2006
Greg
Coding makes the world go round!!!
|
|
|
|
|
Put tempdb on a seperate diskdrive if possible and this will also improve performance.
Look where you want to go not where you don't want to crash.
Bikers Bible
|
|
|
|
|
I have been reading this article, but can't seem to get my application to do what I need.
Here is the situation :
Data parsed from text file, dumped into table. User selects options for the data he needs. Data dumped into datagrid via dataset. I want the user to be able to edit info in the datagrid and save the changes to the dataset, which will now be dumped into a table to be used with Word.
I can't seem to find a way to save the changes to the dataset.
Any help very well appreciated.
Jude
|
|
|
|