|
we have written program in C#.
now when we change the database(in sql express 2008) sp OR view OR add new table OR delete table OR ....
how can update the old customer DB within the newest one without changing the data in customer DB.
in other word :
the customers have previous application and database (full with their specific data). Now a new version is ready and the customer gets the update. In the mean time we made some modification on DB (new table, columns, maybe an old column deleted, or whatever). I’m pretty new in Linq and also SQL databases and my first solution can be: I check the applications/databases version and implement all the changes step by step comparing all tables, columns, keys, constrains, etc. (all this new information I have in my dbml and the old I asked from the existing DB). And I’ll do this each time the version changed. But somehow I feel, this is NOT a smart solution so I look for a general solution of this problem.
modified 16-May-12 4:30am.
|
|
|
|
|
jojoba2011 wrote: delete table
combined with
jojoba2011 wrote: without changing the data in customer DB
Seems like two opposing requirements. You need to review this.
Usually when schema updates are deployed to an exisiting database, ALTER becomes your friend. But each change needs to be analyzed and understood for it's impact.
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]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
thanks for reply!
but i wanna to update my database (it should compare the old database with the Newest one and update the old one ...if need Add/Update/Delete SP,View,table,schema,... )
in other word :
the customers have previous application and database (full with their specific data). Now a new version is ready and the customer gets the update. In the mean time we made some modification on DB (new table, columns, maybe an old column deleted, or whatever). I’m pretty new in Linq and also SQL databases and my first solution can be: I check the applications/databases version and implement all the changes step by step comparing all tables, columns, keys, constrains, etc. (all this new information I have in my dbml and the old I asked from the existing DB). And I’ll do this each time the version changed. But somehow I feel, this is NOT a smart solution so I look for a general solution of this problem.
modified 15-May-12 23:05pm.
|
|
|
|
|
I host a website in public domain with ASP.Net and MS Sql Server.I want to update website database as my company oracle ERP databse updated.
Is it possible?
|
|
|
|
|
Yes using replication or possible triggers...
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I dont need whole data in sql server ,i only need some tables.
so please tell me
how to replicate local oracle database to sql server(hosted in public domain).....
|
|
|
|
|
Not my 1 vote but you deserve it.
Take a look at the subject of replication, there are books on the subject, your question cannot be answered by a forum post.
Triggers spit can be written in the oracle DB that will write the data to SQL Server.
You REALLY need to look into your design as this seems to be dramatically flawed.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Ok,
My confusion not in replication,
Please see the post again.
I try to eleborate more,
My company using Oracle ERP.
Now i have to develop a customer portal in asp.net and sql server that is hosted by any hosting provider.
then
how I develop database is sql server(some tables of erp database) so that the customer data upadated if erp data upadated in real time.
Is it possible?
|
|
|
|
|
You could develop a small app which can be run as a scheduled task every minute or so which will capture data changed from Oracle and transfer to SQL Server. You will need something on Oracle which will place the data in a temporary storage area (probably a table) eg trigger or addition to stored procedures etc. This could be as simple as creating an insert or update statement etc. This will be captured by the app and executed on SQL Server.
|
|
|
|
|
In SQL Server you can create column descriptions. Where do you set the Table Description?
[UPDATE]
Ok, I figured out that you have to use an extended property. What I can't figure out is how to get back a list of tables that have extended properties set for them.
Anyone?
Thanks
If it's not broken, fix it until it is
modified 14-May-12 18:29pm.
|
|
|
|
|
This[^] might be of use.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Thanks. I also found this[^]
If it's not broken, fix it until it is
|
|
|
|
|
In a PRG file, a character array is declared as:
char(1) myvar[11]
and is initialized like:
myvar[1] = Chr(32)
myvar[2] = Chr(45)
...
myvar[10] = Chr(124)
My question is, since myvar[11] was never assigned a value, what value would I get?
I don't have access to a compiler/interpreter, only the source code.
Thanks.
- DC
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
False.
All variables in xBase are False by default. At least in FoxPro, that it.
If it's not broken, fix it until it is
|
|
|
|
|
Kevin Marois wrote: All variables in xBase are False by default. Regardless of type?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
xBase langauges are loosley typed, so it will get its type when assigned to.
If it's not broken, fix it until it is
|
|
|
|
|
Kevin Marois wrote: ...so it will get its type when assigned to.
But if there was no explicit assignment?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Each element in the array that is not assigned to will be False
It's important to remember that xBase languages are loosely typed, so this will compile and run
char(1) myvar[11]
myvar[1] = Chr(32)
myvar[2] = Chr(45)
myvar[3] = "Hello"
myvar[3] = DATETIME()
myvar[10] = Chr(124)
See this[^]
Note that it says:
VFP is a weakly typed language, that is, the compiler allows operations such as assignment and comparison among variables of different types. For example, VFP allows the value of a variable to be cast to another type. The ability to use variables of different types in the same expression promotes flexibility as well as efficiency.
and
Note: Strong typing in Visual FoxPro 7/8/9 SP2 is not enforced at compile or run time, but is used primarily at design time.
This is true for Visual FoxPro, and for FoxBase and dBase, all of which are xBase languages.
Do you know what language this code was written in?
If it's not broken, fix it until it is
modified 15-May-12 13:10pm.
|
|
|
|
|
Kevin Marois wrote: Do you know what language this code was written in?
Not exactly. I heard it was xBase III, but I've seen signs of xBase V. The files have PRG extensions.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Ya, most xBase languages are pretty similar in their syntax. If it compiles in one, it should in another with minimal work.
If it's not broken, fix it until it is
|
|
|
|
|
Kevin Marois wrote: If it compiles in one, it should in another with minimal work.
The problem is I'm converting a portion of it to C.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Lucky you
The thing to remember is that you really don't know what's in a variable until runtime. In FoxPro you can do
Customer = "Smith"
Customer = CreateObject("Excel.Application")
Customer = .T.
Now a later version of FoxPro added the 'AS' keyword:
LOCAL CustomerName AS String
but this is for intellisense only and doesn't constrain the variable to a type, so you can still do
LOCAL CustomerName AS String
CustomerName = 10+5
It's not uncommon in older apps to see a variable declared as Public in the startup program, then see its value changed all over the place. This is hell on earth.
Here's a FoxPro forum [^]you can use. I'v been a member there for many years, and most people there are very knnowledegable.
If it's not broken, fix it until it is
|
|
|
|
|
Hi all,
How do you replace a single occurrence of a character in Oracle?
For example, how do I replace a single occurrence of the percent sign with a plus sign:
'my string a%a here' should be 'my string a+a here',
while 'my string a%%a here' should still remain as 'my string a%%a here'.
I know it can be done using REGEXP_REPLACE, but I'm not sure of which regular expression to use to make it replace only a single occurrence.
Any help will be appreciated.
Thanks
|
|
|
|
|
why don't you rely on occurence of special character.if it more than one,don't replace. simply if-else case..
cheers!!!
Vatsa
www.objectiveprogramming.com
|
|
|
|
|
Hi I wanna Insert a record into the database by fetching the current user and current date.I have to do this by Linq to sql..As I'm new to this can some one tell me how to do this??
user us= new user();
us.Date = DateTime.Now;
us.name ="";
dc.users.InsertOnSubmit("us");
Is this the right way to do?? us.name should be the login name..how to fetch the user name from db??
|
|
|
|