UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Sql, Office 2010    
 
   
ScorpDevil
post Apr 28 2012, 01:33 PM
Post #1

UtterAccess Guru
Posts: 567
From: Miami, FL



Hello,

I’m having a little issue with how I’m going to handle this issue.

I wanted to ask the experts for some help.

Okay, i have 3 tables:

1. dbo_tbl_1
2. dbo_tbl_2
3. dbo_tbl_3

okay, tbl_1 is in holding my case number. In other word the combination of all of fields generates the case number. tbl_2 holds my cases, other words my costumer case information.tbl_3 holds the customer information name, address and so.

Now, I’m connected thru ODBC to SQL as back-end.

Now, when I create a new case I have to do the following:

Go to tbl_1 and obtain the last seq_num, “SELECT seq_num FROM tbl_1 WHERE cutomer_num = blah” now I have to + 1 (this means sequence of the last file created)

Go to tbl_3 and obtain the customer num (if not match add new)

Got to tbl_2 and insert all my data (from: Form, tbl_1 seq_num, tbl_2 cust_num) then return my new case ID

Then insert into tbl_1 the new case_num structure (from: Form, tbl_2 case_id) and repeat again same operation with tbl_3 (from: Form, tbl_2 case_id)

My question is:

Wish end would you have do this process?

1. Front-End Access
2. Back-End T-SQL

My reason is because I’m concerned with performance.

Thanks
SD
Go to the top of the page
 
+
MadPiet
post Apr 28 2012, 05:48 PM
Post #2

UtterAccess Guru
Posts: 775



General rule of thumb is to do the simple data validations in the front end and the data-related/domain related ones in the back end through a stored procedure. I would create a stored procedure in SQL Server that did the DML (insert/update/delete) and then do any domain checks (Exists clauses usually) in the stored procedure. Keep all the data as close to the back end database as possible, except the static stuff.
Go to the top of the page
 
+
ScorpDevil
post Apr 28 2012, 06:33 PM
Post #3

UtterAccess Guru
Posts: 567
From: Miami, FL



Yeah, I was thinking like that...

Sounds logical - less traffic thru the network. (IMG:style_emoticons/default/thumbup.gif)
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 19th June 2013 - 05:24 AM