|
Which version of XP?
"My interest is in the future because I'm going to spend the rest of my life there." - Charles F. Kettering
|
|
|
|
|
Try a different cd/dvd unit - I had exactly the same problem over the weekend. Used an external USB dvd and no problems.
|
|
|
|
|
I want to learn how to design database ,i want some solved examples, samples,case studies,step by step solutions ,or some one has some materials etc ,
please guide me how to design DB,i have much problems in creating relationships.
you can send me any helpful material at waqarnaeem2@hotmail.com
|
|
|
|
|
|
Please, I'd like to know how to delete a member's related information(user name, pasword,....) which are stored in ASPNETDB database created in Visual Studio 2005 either by using a specefic wizard like the wizard used to create users or by code.
Any suggestions please??
|
|
|
|
|
Try typing "delete user ASPNETDB" into Google.
|
|
|
|
|
call dbo.aspnet_Users_DeleteUser to delete the user account.
Hope this helps.
|
|
|
|
|
hi
i am currently using vs.net 2005 c# window application and using ms sql as the database.
usually when i create database it is good practice to separate our database to such as below:
table: dad
table: child
where by when inserting data we have to add the dad data first then the child.
insert data into dad table
insert data ,max(index) from dad into child table
my question is there a more effective way to do this like inserting the data in one sql command while inserting the newest index from the dad table to the child table as a reference.
and thus if there are any error during the adding of data to any of the table both table will be then unaffected.
modified on Saturday, August 15, 2009 1:01 PM
|
|
|
|
|
neodeaths wrote: and thus if there are any error during the adding of data to any of the table both table will be then unaffected.
There is a mechanism built into SqlServer to take care of situations like that. It is called Transactions this article on transactions[^] covers the basics. I found it by Googling for sqlserver transactions c# which gives loads of hits.
Explore for yourself, experiment, have fun.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
As Henry suggested transactions are the way to control this process. However I have trouble with you using max(index). You should be using an identity field for your primary key and then get the scope_identity() value from the dad insert to apply to the child record.
I rarely use transactions but I consider them valid for processing related DATA, while the dad/child data is related I don't think a transaction is warranted. I would have a proc that inserts dad and returns the scope_identity() as DadID and then insert the child in a separate proc.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: while the dad/child data is related I don't think a transaction is warranted
A bit of a sweeping staement there. It all depends, if you need to have both records inserted or niether of them then it should be a done in a transaction, but if orphan records are acceptable then there is no need.
Mycroft Holmes wrote: I would have a proc that inserts dad and returns the scope_identity() as DadID and then insert the child in a separate proc.
Fine, unless you must have them both inserted. In your senario it would be possible to have Dad records with no Child records - maybe, depending on the application, this could be an invalid case.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Ashfield wrote: A bit of a sweeping staement there
That's why I stated it as a personal view, and yes it must be driven by the business requirements every time. I generally work with batch processing and rarely need trans.
Ashfield wrote: Dad records with no Child records
I would assume that unless the business required the relationship - dad does imply it I must admit.
|
|
|
|
|
Hi
i have developed stored procedure and able to generate SSRS report for the same.
i have two questions here
1)i am getting data from the sql server and i need to do lot of caluclations based on some conditions,so I would like to know how to implement the code without using stored procedures
2)How to use reporting engine features effiectvely
Regards,
Kiran
|
|
|
|
|
I would have thought you would be better to do the calcs in the stored proc, thats generally what it is there for. We do almost no work at the report layer unless it involves report elements (layout and sum totally etc). While the report layer has functions etc I don't think you should be doing "a lot of calculations" using them.
As for you second question, what features, what engine?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks in advance
I have to implement one project in which i have SQL SERVER 2005 database and i have total 4 locations which are having a very high speed internet connection.
Now all of these locations wants real time information that if one transactions is done on one location then it will show or update the other location also that lets suppose that now we have stock of item A remaining 10.
What i need to know is what is the best way to implement this through linked Server/ cubes or
Xml etc while my front end application is using ODBC connection
|
|
|
|
|
I believe what you're looking for is known as replication[^].
Adam Maras | Software Developer
Microsoft Certified Professional Developer
|
|
|
|
|
Thanks for posting but what do you think i should do it using sql server replication
|
|
|
|
|
I suggest you hire a good consultant, replication is not for dummies, it is an area fraught with peril for the beginner. I have been using SQL Server since it was Sybase and I would not attempt this without a expert support.
Replication is the way to go so start researching and testing (not on the production servers). I predict it will take you at least 2+ months to get a good handle on replication.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
thanks for the post
well man i am doing this for almost more then 7 years but still in search for better solution
any how thanks for nice post
|
|
|
|
|
softdev_sup wrote: well man i am doing this for almost more then 7 years but still in search for better solution
"My interest is in the future because I'm going to spend the rest of my life there." - Charles F. Kettering
|
|
|
|
|
softdev_sup wrote: well man i am doing this for almost more then 7 years but still in search for better solution
Then that maybe suggests that replication is the best solution - after all, thats what it was designed to do, keep databases syncronised.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Hi Friends,
I need help in the following query.
SELECT A.BILL, A.BILLER, A.VERSION_NO,
A.CODE, A.NAME,A.SEGMENT_CODE,
A.COMMENT,B.BILL AS BILL, B.BILLER AS DW_BILLER,
B.MCN AS DW_MCN, B.SO AS DW_SO, B.BG AS DW_BG,
B.CODE AS DW_CODE, B.NAME AS DW_NAME,B.SEGMENT_CODE AS DW_SEGMENT_CODE
FROM WEB_REF A, WEB_CUST B
WHERE A.BILL=B.BILL AND A.BILLER=B.BILLER
ORDER BY A.BILL
The above query is working fine. and o/p like below:
A3 3A 3
A3 3A 2
A3 3A 1
But now requirement is that, the table A consists VERSION_NO.
For any combination that found for A.BILL=B.BILL AND A.BILLER=B.BILLER
may have different VERSION_NO.
Now I want to fetch only the row which is having max(version_no) for the A.BILL=B.BILL AND A.BILLER=B.BILLER the combination.
I needs the o/p shd be
A3 3A 3
Likewise for all the rows. Pls help me.
Thanks in Advance.
Regards,
|
|
|
|
|
I don't know Oracle but in SQL Server I would use Top 1 and order by version_no desc . There will be something similar in Oracle.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: There will be something similar in Oracle.
Yes. Oracle uses rownum . Something like,
Select * from table where rownum = 1 order by version_no desc
|
|
|
|
|
Hi Navaneeth,
Thank you so much.
I understood the rownum=1 will work when i do order by version_no desc.
But in this case, order by is dynamic..that is user-given input. So whatever column user wish to come as order by he ll select that.
Can u help me how in that case i have to use this query.
Thanks lot really!!!
Regards,
|
|
|
|