|
alexrad wrote: I'M SORRY FOR NOT TELLING ALL DETAILS
We're not deaf - please do not shout.
|
|
|
|
|
Dear All,
I am doing a project , which is an MFC application (MDI)
. Now its a standalone application with MS Access as the "Back end". I
have used ADO to made the connection.
Now I want to make this application to work for several clients
at the same time . I also want this application to communicate with 3
different types of Database .
1) MySQL
2) MS SQL Server
3) Oracle
My application should connect with any of the above DB , without making
any problem..
Can I make a general implementation by using ADO ?
What are the precautions I have to take to implement this ?
I think ,I have to face the problems of "concurrent write/reads " to
the DB...How can I overcome this ?
Now I am using Multiple SQL queries for multiple table updations.
Whether I can use transactions to avoid data loss during multiple table
updations...?
But I think MySQL won't support transactions...Is there any other
option?
Can any one pls give me a suggestion ...?
Thanks in advance...
vinsankar
|
|
|
|
|
hello friends,
I need to transfer my database from one server to database on another server every 24 hours. I can create windows application but it will be cumbersome to write bulk of code . So can u suggest me some service or any other way thourhg query or stored procedure by job scheduling which can run every 24 hours and move my data from one database on one server to another sql database. Both databases are sql server 2000 but servers are diffeerent so how to connect them while transferring dbs. ? plz help me , its urgent.
regards,
max
max
|
|
|
|
|
|
My code:
<br />
_RecordsetPtr record;<br />
<br />
...
<br />
_variant_t vt;<br />
<br />
vt.vt = VT_I1;<br />
<br />
vt.cVal = 't'; <br />
<br />
record->PutCollect("Mode",vt);
|
|
|
|
|
It might be helpful to know what the runtime error is
only two letters away from being an asset
|
|
|
|
|
If I change Mode's length to 3 BYTE, that no runtime error.
But Mode's value is the character's ASCII value(117), not 't'
|
|
|
|
|
I have a problem with converting a date into a double. As the title says I get different values from SQL and .NET. Example: Converting '2006-11-13 14:57:02.343' in sql with CONVERT(FLOAT, '2006-11-13 14:57:02.343') gives 39032.6229437886. In .NET using ToOADate() with same datetime value I recive 39032.6229437847. Adifference by 3 milliseconds, which I can not afford. Is it a known problem?
Thanks in advance,
|
|
|
|
|
I'm guessing that the difference is probably because one of the conversions, the .NET one, rounds or truncates the time to hundredths of seconds. Try the comparison with the time as .120 in each case then using .125 in each case. The first will likely give the same result and the second might give a difference of 5 milliseconds.
Chris Meech
I am Canadian. [heard in a local bar]
I agree with you that my argument is useless. [Red Stateler]
Hey, I am part of a special bread, we are called smart people [Captain See Sharp]
The zen of the soapbox is hard to attain...[Jörgen Sigvardsson]
I wish I could remember what it was like to only have a short term memory.[David Kentley]
|
|
|
|
|
If _date is '2006-11-13 14:57:02.343' in .NET. DateTime.FromOADate(_date.ToOADate()) returns '2006-11-13 14:57:02.343' as well. Which meens that either there is no rounding or it's too late and I didn't undertand you. In any case I work with timestamps and don't have the luxery to choose milliseconds. I can solve it by choosing another pk than a datetime column. But I found it very strange that SQL and .NET using different algoritms.
Tanks,
|
|
|
|
|
SQL's DateTime Data type is only accurate to 3.33 milliseconds, and always rounds like this .000,.003,.007). .Net's DateTime is accurate to .0000001 sec (100 nanoSec.). Both are documented (see SQL books online for SQL types, MSDN for .Net. SQL has been around for 10+ years, and is unchanged for compatibility with older versions. .Net is new, and takes advantage of the higher accuracy available on modern PCs (Not all can deliver that accuracy). If you need maximum resolution, make yor database field a bigint type (long) and store DateTime.Ticks there. Handle the conversion yourself in .Net.
We need to graduate from the ridiculous notion that greed is some kind of elixir for capitalism - it's the downfall of capitalism. Self-interest, maybe, but self-interest run amok does not serve anyone. The core value of conscious capitalism is enlightened self-interest.
Patricia Aburdene
|
|
|
|
|
That I know. If I would create a double in .NET code using ToOADate() and then save it in the db as DateTime that suddenly would be a problem. Example: '2006-11-30 12:00:00.0001' in .NET would become '2006-11-30 12:00:00.000' in sql as you pointed out. But, the date is created in the db. So it's db's resolution. If you take an exectly same date down to milliseconds it should return a same value.
|
|
|
|
|
|
I Have used full text indexin my project.
I want to find "Full Text Index Catalog Creation" Time duration.
Is there any method to find.
I am using SQL Server 2005
Regards
Vasanth
|
|
|
|
|
I am new to SQL Server. I want learn basics abt
1. Stored Procedures
2. View
3. Index
4. Triggers
5. Function
6. Cursors
7. Locks
Can anyone help
Mads
|
|
|
|
|
Try W3Schhols !!! or buy a book. Microsoft offer free online courses sometimes, Have you tried book on line for SQL server ?
Blog Have I http:\\www.frankkerrigan.com
|
|
|
|
|
There are numerous books that you may want to take a look at. You may want to take a look at Microsoft SQL Server 2005 for Dummies, or Sams Teach Yourself SQL Server 2005 Express in 24 Hours.
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I have a table which has
Class Name
1A Albert
1A Bill
1A Paul
1B Ricky
1B Kelvin
1B Walala
I want to convert it to a table which is
Class FULL LIST
1A Albert/Bill/Paul
1B Ricky/Kelvin/Walala
I dont know how to write the query. Pls kindly help
|
|
|
|
|
Which database are you trying to run this in. If it's SQL Server 2005, you can use a thing called a Common Table Expression to help you out with this. If it's not, (and I apologise to the Oracle guys if they have something whizzbang like CTE's), you will need to write a recursive query. These aren't fun, but examples can be found on Google.
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Oh no.....I am SQL Server 2000....But anyway, thank for helping.
|
|
|
|
|
You could do something like this:
CREATE FUNCTION GetNames (@cClass varchar(2))
RETURNS varchar(1000) AS
BEGIN
DECLARE @cClassNames varchar(1000)
DECLARE @cClassName varchar(50)
SELECT @cClassNames = ''
DECLARE namecursor CURSOR FOR
SELECT DISTINCT Name
FROM classtable
WHERE Class = @cClass
OPEN namecursor
FETCH NEXT FROM namecursor INTO @cClassName
WHILE @@FETCH_STATUS = 0
BEGIN
select @cClassNames = @cClassNames + @cClassName +'/'
FETCH NEXT FROM namecursor INTO @cClassName
END
CLOSE namecursor
DEALLOCATE namecursor
RETURN(@cClassNames)
END
Call it like this:
select class, dbo.GetNames(class) as [Full List] from (select distinct class from classtable) as tbl
--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
|
|
|
|
|
Nice - I was working on one which didn't use cursors (it used stored functions), but there's no need now as yours does the job perfectly.
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Many Many Thanks. You give me a great great hand.
|
|
|
|
|
We are trying to develop a windows application in c#.
There are many classes which should have access to database(SQL Server). I do not want each class to write their queries.However, I want to give them an interface or another way that they can acess database easily. For example, they should be able to say "this.insert(), this.delete()" or something like this. I have checked Facade pattern. Is there another way of doing this.I want to have some other options.
thanks...
aysan ethem narman
|
|
|
|
|
Write a dal class (or classes). These control access to the database. I tend to write mine as a C# Façade on to the stored procedures. In other words, for each method on the DAL is one stored procedure.
|
|
|
|