|
thanks,
about your question: we are moving the data base from SQL Server to Oracle. every thing goes OK by SQL, but this problem is by Oracle
|
|
|
|
|
Ok then it is the different databases, you may have not set a primary key on the table to be updated in Oracle
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I found where is the problem.
after all discussions, about how can sombody send an Update command to data base!!! the key is here:
Every thing was ok in code and table difinitions. just in connection string a property should be defined: "OLEDB.NET=True"
was easy??
|
|
|
|
|
That's a perfect answer!!!!How did you know that? hard work for me
|
|
|
|
|
I have a large database with a subset of five tables described here:
http://www.senselessdestruction.com/AssociationProblem.jpg[^]
Using the Entity Framework, when creating an entity model based on those tables I get the error:
Foreign key constraint 'FK_UserContractCompanies_TimesheetContractEntries' has been omitted from the storage model. Column 'CompanyId' of table 'SMSModel.Store.UserContractCompanies' is a foreign key participating in multiple relationships. A one-to-one Entity Model will not validate since data inconsistency is possible.
The intended business logic is to have a subset of users as contract users. A contract user arrives at the workplace, can sign in (an entry is made in the TimesheetEntries table), work for X hours and then sign out. For any user that is a contract user, the TimesheetContractEntries table exists to record their times broken into two records. The first record would be start and end times showing the first 8.5 hours of work, without a related ContractCompanyId, and the second record would be the remaining time with a related ContractCompanyId.
I'm using VS 2010 Beta 2, and have tried including foreign key columns in the model. Is the schema of my database flawed or is there anyway to overcome this limitation in the EF?
-Mike.
|
|
|
|
|
DBCC CHECKDB 'TEST"
I just cancelled this queury to run my DB full backup .
this qeuery rolling back more than 7hrs .
how do i stop thi roll back and get my full backup .
this qeury was running from SQL server agent .
|
|
|
|
|
As far as I know you can't, stopping the database may leave it in an unrecoverable state. We have had dev databases in this state and had to recover from backups.
|
|
|
|
|
I have to store hindi,chinese ... etc language words in my db using oracle 10g ... how can i do that..
can any one help me please..??
or atleast .. how can i do the language conversion from HINDI to english ... any sourcecode?
so that i can store english strings directly....
plzz help
regards,
Vineeth Koganti
|
|
|
|
|
n3ophyt3 wrote: I have to store hindi,chinese ... etc language words in my db
What is the problem? A string of characters has no meaning to the database, it is just characters, so you can store any language you like. It is only when you extract those characters from the database and display them that they have any meaning, e.g. a message read by a human operator.
|
|
|
|
|
Hi,
You can create a Unicode database that enables you to store UTF-8 encoded characters as SQL CHAR datatypes (CHAR, VARCHAR2, CLOB, and LONG).
For more info. please look into
http://download.oracle.com/docs/cd/B19306_01/server.102/b14225/ch6unicode.htm[^]
n3ophyt3 wrote: how can i do the language conversion from HINDI to english ... any sourcecode?
Some pseudo code
function OtherLanguage2English(value,offset)
{
var ctrlValue=value;
var english="";
for (var idx=0; idx<ctrlValue.length; idx++)
{
individualChar = ctrlValue.substring(idx,idx+1);
var code =individualChar.charCodeAt(0);
english=english+ String.fromCharCode(code-offset);
switch(offset)
{
case 2358:document.getElementById('txtEnglish').value=english;break;
}
}
}
Though it is in javascript but this function also converts Hindi to English.. So I thought that you may get some idea.
Sorry for not getting an appropriate code for your help. I will update as and when I will get the code for oracle for serving the same purpose.
Niladri Biswas
|
|
|
|
|
Gentleman:
I recently put MSSQL Server 2005 on my server running Windows 2003...it went off perfectly. I decided to replace the MSSQL 2000 that I was running on my desktop (Win XP) as well. Unfortunately, although it said that there were no errors, the Server Management Studio does not appear in the program files (or anyplace else) that I can find. The only links that appear are for the Server Configuration and the Surface Area Configuration. I tried to do a new install (on top), but the application said that all components were already installed. Before I remove the installed app and start all over, I want to know if I am missing something? Somewhere? All assistance is greatly appreciated. Pat
|
|
|
|
|
Probably you installed from a package that had only server components and no client tools. See if you can get a package that can install Management Studio.
|
|
|
|
|
Shameel,
Thank you for taking the time to respond. My install was a full Enterprise edition. I did figure out the problem and wish to share it with you (and others) because it is especially important to anyone that has installed a version of SQL 2005 Express or MS Visual Studio 2008, which automatically installs the express version. When installing over a previously installed version, any new install must be done from a DOS prompt using an update command on the command line. If this is not done, it will see the previous version as being successfully installed and will skip the install of the Database server. I have done this and it is now working perfectly. Of course, it took me the better part of a day to figure it out. Hopefully, this might save someone else that trouble. Thank you again and happy coding....Pat
|
|
|
|
|
Sir,
In my ASP.NET application I have the dashboard.
Number of records needs to be fetched from database into it. Hence,I want to write stored procedure which gives me these records using multiple Select statements. Is it possible to fetch it? If yes how it can be done.
Thanx
|
|
|
|
|
Try googling for "ado.net multiple result sets".
|
|
|
|
|
If you are trying to get multiple records from the same table them multiple selects are not required.
If you have multiple records sets coming from different table then you will need multiple selects.
WARNING multiple recordset returned from the same can destroy your system, it can be dramatically slower to get multiple recordsets.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi, coming to ur question
deepseeindeepsy wrote: Is it possible to fetch it?
Ans : Yes
I am giving a small example
Step 1: Create the Stored Proc
Alter Procedure GetMultipleRecords
As
Begin
-- First select
Select * from test1
-- Second select
Select * from test2
End
So this will give u two record sets
Step 2: Use Data Adapter & DataSet
From Asp.net application, by using DataAdapter get the records set into the DataSet
Step 3: Use respective datatable(s) from DataSet
Get the record sets from the DataSet into DataTable(some pseudo code in c#)
e.g.
DataSet ds = getDataRecords();->You will get the records from database
if(ds!=null && ds.tables.count > 0)
{
DataTable firstDt = ds.tables[0];
DataTable secondDt = ds.tables[1];
}
Hope you get the idea.
Now try by urself and I am sure you will reach the point.
Have a nice day.
Niladri Biswas
|
|
|
|
|
Hello Friends,
I've a table as shown below
ID RefID
1 0
2 1
3 2
4 1
5 1
and i want to display it's output as shown below but i'm not getting the way
please suggest a way
ID RefID Total
1 0 3
2 1 1
3 2 0
4 1 0
5 1 0
|
|
|
|
|
This is one solution if the table is small, it requires a seperate sub select for each record
Select A.ID, A.RefID, (Select count(*) from Table where RefID = ID) Total
From Table
For a more efficient method on a large table I would use a LEFT join to itself on TableA.ID = TableB.RefID then use Isnull, a case statement and count to get the same result from a large table.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Try this
declare @tbl table(id int identity, refid int)
insert into @tbl
select 0 union all select 1 union all
select 2 union all select 1 union all
select 1
select t.id,t.refid,case when x.cnt is null then 0 else x.cnt end as total
from @tbl t
left join
(
select refid,count(refid) as cnt
from @tbl
where refid <> 0
group by refid
having (count(refid)>0)) x
on t.id = x.refid
Output :
id refid total
1 0 3
2 1 1
3 2 0
4 1 0
5 1 0
Niladri Biswas
|
|
|
|
|
I have some RDL that was written using the Business Intelligence Design Studio (BIDS) in Visual Studio 2005. This report has a subreport that is visible depending upon a value in the dataset that is the source for the reports data. I have an expression in the hidden property for the subreport that returns true or false depending upon the value. The expression is like =iif(Fields!ShowSubreport.Value = 0, False, True). Anyway everything works fine in Visual Studio 2005. However, I am trying to get this report to work with VS 2008. It is my understanding that when I open this report using BIDS in VS 2008 that it will automatically convert the RDL from 2005 to 2008. It does this this changing my Lists to Tablix and other things. However, when I view the report now, I cannot see the data in the main body of the report. But if I get rid of the expression if the hidden property of the subreport, I can see everything just fine. For example, if I change the hidden property from the expression above to ‘False’ it works just fine. I have tried several different ways of writing the expression, but nothing seems to work. Does anyone know what could be causing this?
|
|
|
|
|
Hi,
i want to copy the database from one system to pen drive and then add that database to another system.
How can i achieve this ?
Thank you
|
|
|
|
|
right click on database->tasks->restore->database.
you wil get a window select the radio button From device and then click on .. you wil get another window then click on add and choose your database from the pen drive.
|
|
|
|
|
sarang_k wrote: you wil get another window then click on add and choose your database from the pen drive.
No it doesn't let me store in pen drive.
what is backup option under task if restore does this job as you said ??
|
|
|
|
|
Yes.. Removable devices will not be listed in Backup folder browser. So backup in anyfolder and then copy it to your pen drive.
Backup option means you make a compressed file that could produce the exact same database instance.
If you have a backup file you can restore it to any sql server instance easily.
Are you clear now ?
|
|
|
|