Showing posts with label hii. Show all posts
Showing posts with label hii. Show all posts

Tuesday, March 27, 2012

Database help

hii have a DB scenario, it may be basic to u, but i am new to this so plz explain in details or if you can provided links to related articles that will be great.

i have sql server 2000 and i am using dataset on my asp.net application. now as Dataset is connenctionless, what will happen if i have filled my dataset with some records from database and updated those records in dataset. in that time some other user deleted some of those records from database. now when i will try to batch update database using my dataset (with records that has been deleted from DB) what will happen? will i get an exception or what. plz explain in detail . any links to articles will be great.

my second question is same, what are the methods to lock database if one user is accessing (updating) one record, so that other user dont get to change it at the same time? do i have to manage it in Database or what.

thank you in advance

regards

Hi,

I think this article will explain a lot

http://www.asp.net/learn/data-access/tutorial-21-vb.aspx

|||

Hi zeeshannasir,

now as Dataset is connenctionless, what will happen if i have filled my dataset with some records from database and updated those records in dataset. in that time some other user deleted some of those records from database.

My question is: what do you mean by "dataset is connectionless"? Do you mean that your database has been detached in your database engine? Well,in that case your database won't be accessible at all so you(and all the other users) cannot modify your database.

As to your second quesion, actually you don't have to worrry about it.All the transactions in SQL has been designed to comply with theACID (Atomicity ,Consistency, Isolation Durability) compliance.For example, if user A is currently opening up and reading the info. of a particular database, and meanwhile, user B is trying to open up the same database. Since there is no modification being made to the database, user B is allowed to open up. However, if user A is writting new data to the database, all the operations user B makes will be denied.

Hope my suggestion helps

|||

hi Bo Chen

what i meant by "dataset is connectionless" is that, i filled my dataset with required data using a stored procedure. now i am not connected to database, plz correct me if i am wrong. any changes i made to dataset is local until i dont batch update manually, is it correct. now what will be the scenario if this is the case, i have filled my dataset and made some changes and while i was doing that someone else also access the same database and changed some of the records.

plz correct me if i am wrong

thanks

Wednesday, March 21, 2012

database errr,URGENT

Hi
I am using mssql7 server.unfortunatily the space of the
hard disk reached below 10mb and while saving data
server has showned the disk full error.
After making enough space i restared the server,the server
has started,but one of the main database is showing an
error.msg 945 Level 14 state 2, Some of the files
could not be activated.
i am linking some of the table from this database to
another database,how can i start this database.
Please help me, urgent
Thank you
You may have better luck asking this question in
microsoft.public.sqlserver.server. The topic of this newsgroup is
Microsoft English Query.
SK
shif wrote:

>Hi
>I am using mssql7 server.unfortunatily the space of the
>hard disk reached below 10mb and while saving data
>server has showned the disk full error.
>After making enough space i restared the server,the server
>has started,but one of the main database is showing an
>error.msg 945 Level 14 state 2, Some of the files
>could not be activated.
>i am linking some of the table from this database to
>another database,how can i start this database.
>Please help me, urgent
>Thank you
>
>

Thursday, March 8, 2012

Database diagrams

Hi
I'm trying to view a SQL 2000 Diagram that was created by my colleage. When
I click on "Design Diagram" it appears blank (ie it does show any of the
table links). However if I create a diagram I can view that and my colleage
I
can view the diagram that I've created and my colleage can also view it.
Any ideas.
TIA
DwightDwight,
Did you apply Visual Studio Service Pack 6?
If so, this has happened to many people. I don't know if
there is a knowledge base article or supported fix for the
issue. Others have reported working around the issue by
installing an older version of mdt2df.dll
-Sue
On Mon, 10 Jan 2005 03:47:03 -0800, Dwight
<Dwight@.discussions.microsoft.com> wrote:

>Hi
>I'm trying to view a SQL 2000 Diagram that was created by my colleage. When
>I click on "Design Diagram" it appears blank (ie it does show any of the
>table links). However if I create a diagram I can view that and my colleage
I
>can view the diagram that I've created and my colleage can also view it.
>Any ideas.
>TIA
>Dwight|||Hi Sue,
Yes I have install VS SP6. I'll see if I can find an old version of
mdt2df.dll and reinstall it.
Thanks
"Sue Hoegemeier" wrote:

> Dwight,
> Did you apply Visual Studio Service Pack 6?
> If so, this has happened to many people. I don't know if
> there is a knowledge base article or supported fix for the
> issue. Others have reported working around the issue by
> installing an older version of mdt2df.dll
> -Sue
> On Mon, 10 Jan 2005 03:47:03 -0800, Dwight
> <Dwight@.discussions.microsoft.com> wrote:
>
>

Wednesday, March 7, 2012

database design:dnamically build where clause

Hi
I am creating a table to store metadata information for certain technical
parameters which are stored in various tables.
These parameters have various criteria to determine if they are compliant to
certain predefined conditions or not.I will explain with an example:
For ex,
paramA is compliant if its value is 50
paramB is compliant if its value is between 0 and 2
paramC is compliant if its value is 35% of another column
paramD is complaint depending on colA,ColB,ColC
If colA = 5 then paramD is compliant if paramD=2.
If colB = 10 then paramD is compliant if paramD=3
If colC =50 then paramD is complaint if paramD=70
paramE is compliant if is 1 or 0
So my table has fields such as
DDId,
ParamName
ParamDBname
ParamTableName
Compliancecondition(varchar 200)
etc.
I need to store the information regarding these compliant conditions so that
I can build my queries like
select <paramName>,case when<compliance condition is true> then 1 else 0,
from <paramDB>.<paramTable>
where<compliancecondition>
but this will result in dynamic SQL.is there a better way to store the
information for these varying compliance conditions?
thanks for your help.
etcLooks like you need something like a rules engine to satisfy your dynamic
needs. Check this nice article on this subject to see if its useful for your
scenario:
http://msdn.microsoft.com/sql/defau.../>
eengine.asp
--
HTH,
SriSamp
Email: srisamp@.gmail.com
Blog: http://blogs.sqlxml.org/srinivassampath
URL: http://www32.brinkster.com/srisamp
"tech77" <tech77@.discussions.microsoft.com> wrote in message
news:7E249C36-147E-4A0A-9B77-42F9F4CA6E6E@.microsoft.com...
> Hi
> I am creating a table to store metadata information for certain technical
> parameters which are stored in various tables.
> These parameters have various criteria to determine if they are compliant
> to
> certain predefined conditions or not.I will explain with an example:
> For ex,
> paramA is compliant if its value is 50
> paramB is compliant if its value is between 0 and 2
> paramC is compliant if its value is 35% of another column
> paramD is complaint depending on colA,ColB,ColC
> If colA = 5 then paramD is compliant if
> paramD=2.
> If colB = 10 then paramD is compliant if
> paramD=3
> If colC =50 then paramD is complaint if
> paramD=70
> paramE is compliant if is 1 or 0
> So my table has fields such as
> DDId,
> ParamName
> ParamDBname
> ParamTableName
> Compliancecondition(varchar 200)
> etc.
> I need to store the information regarding these compliant conditions so
> that
> I can build my queries like
> select <paramName>,case when<compliance condition is true> then 1 else 0,
> from <paramDB>.<paramTable>
> where<compliancecondition>
> but this will result in dynamic SQL.is there a better way to store the
> information for these varying compliance conditions?
> thanks for your help.
>
>
>
> etc

Friday, February 24, 2012

Database design pointers (please!)

Hi

I'm currently having to design a database for a recruitment agency
that's just started up and have one area where I'm a little unsure
where to go.

Basically I've implemented the 'standard' Customer, Contacts tables
linked on CustomerID, and also have CallRecords (for phone calls etc
made to contacts) Linked on ContactID.

My difficulty is that they want to be able to store names/details of
people looking for work (candidates) BUT these people may also be a
contact (i.e. the agency could be dealing with a contact at a company
who is also looking for a new job themselves). They would also like to
(naturally) have these candidates details held against 'current
employer' customer details so there may be situations where a candidate
is JUST a candidate (i.e. not currently working and therefore not
associated to a company), OR they may be a candidate AND a contact, and
you may have contacts who are JUST contacts (i.e. not actively looking
for work at the moment).

I'm basically just trying to figure out the options I have for storing
the contact details and candidate details.

FYI I need to store the same details for Contacts and Candidates (i.e.
name, job title, contact numbers etc) but Candidates require extra
information to be stored about them (work experience, qualifications
etc).

Any help/pointers would REALLY be appreciated!!

Thanks in advance
MartinPritcham (dontwanttogivemyname@.hotmail.com) writes:
> My difficulty is that they want to be able to store names/details of
> people looking for work (candidates) BUT these people may also be a
> contact (i.e. the agency could be dealing with a contact at a company
> who is also looking for a new job themselves). They would also like to
> (naturally) have these candidates details held against 'current
> employer' customer details so there may be situations where a candidate
> is JUST a candidate (i.e. not currently working and therefore not
> associated to a company), OR they may be a candidate AND a contact, and
> you may have contacts who are JUST contacts (i.e. not actively looking
> for work at the moment).
> I'm basically just trying to figure out the options I have for storing
> the contact details and candidate details.
> FYI I need to store the same details for Contacts and Candidates (i.e.
> name, job title, contact numbers etc) but Candidates require extra
> information to be stored about them (work experience, qualifications
> etc).

My gut reaction is that you should have a Persons details, where you
have all common information about persons, and then Contacts and
Candidates would refer to that table and augment it with the specific
information.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Database design in SQL Server 2005

Hi
I am facing a problem in designing a database for my project.Please help

I have hotel Information.The hotel allocates rooms for my company.This is done on weekly basis.

Now suppose in first week of a year the number of rooms allocated to the company is 3,2ndweek =5,3rdWeek=5 and so on...

So when i search based on a week i should have one result set
If i search based on MOnth i should have one result set.. in this way.

So what fields i need to take in a database table so that when i search based on week /month/quarter/year i get different resultsets.

Create a table called Room with all room details and a roomId, booked date etc. Create a Search stored procedure which take searchType as an input parameter. Search type can be Weekly or Monthly. SP would be like:

if @.searchType = "Weekly"

//get the start date, calculate end date of the week (which simply could be startDate +7 ) and select the rooms booked within this date

if @.searchType = "Monthly"

//get the start date and calcuate the end date of the month and select rooms booked in this date range

So basically you need just a start date, and depending on the comparison type, you calculate the end date and search within this date range

Hope this helps,

Vivek

|||

Hotels(Pid | Hotel_Name | Address)

Rooms_Type(like master, single, deluxe etc)

Pid | Description

Hotel_Rooms (Pid | Hotel_ID | Room_ID )

Room_Allocations (Pid | Date | BookedYN | Booking_No | Hotel_Rooms_ID | Qty_Allotted )

above is the list of tables i think should be helpful to you. Room_Allocations is key table here that can help you out. Note : say you've Hotel Crown Plaza, for which the quantity allotted to you for Master Room is 5, in that case you will insert 5 records in Room_Allocation table. now when you book a room you'll insert booking_reference against a room where BookedYN is 'N'.

hope it makes sense.

regards,

satish

|||

Thanks Vivek !!!

Your idea has helped me.Smile

|||

Hey Satish

Thanks for sharing your ideas...Big Smile

|||

no worries.

cheers,

satish.

|||

HI
Thanks for your help .I have a doubt.
Plz help

i have a tble structure like this:


Id St_dt end_dt hot_id no_of_room
1 Jan1 Jan30 1 5

Now i want to enter another data like
2 Jan15 Jan20 1 7

what i want is my actual table should have 3 rows of data like

Id St_dt end_dt hot_id no_of_room
1 Jan1 Jan15 1 5
2 Jan15 Jan20 1 7
3 Jan20 Jan30 1 5


How do i do this. Or is there any other way of avoiding data overlapping