Author |
Topic  |
|
Cliff
Average Member
  
United States
501 Posts |
Posted - 03 August 2003 : 20:38:05
|
Hi all,
I am not a programmer (that should be my name here), and would like to ask for help. I have a lot of a new site built using CF5.0 and MS SQL 2000. I know this is primarily an asp site, but I think a sproc is an sproc, right? Just calling it in CF will be different. I have made the unfortunate mistake of not learning about stored procedures. I am having a tough time finding a good reference book and have done a fair amount of searching on it.
Could I ask someone here to help me write my first one? If you would I can likely follow it to create more on my own.
Here is the processing page I have for a form, I need to learn two thing, first what will the stored procedure itself look like, second, how do i call it on this page?
<CFSET TheDate = Now()> <CFLOCK Name="InsertNewRecord" Type="Exclusive" TimeOut="30"> <CFTRANSACTION> <CFQUERY Name="InsertNewUser" DataSource="MyDSN"> Insert Into MyTable(FirstName, LastName, MiddleInit, SecurityLevel, Affiliation, UserName, Password, Email, Insertby, InsertDateTime, AdminAccess) Values('#Form.FirstName#', '#Form.LastName#', '#Form.MiddleInit#', 1, '#session.Affiliation#', '#Form.UserName#', '#Form.Password#', '#Form.Email#', '#Session.UserPK#', #TheDate#, '#Form.AdminAccess#') </CFQUERY> </CFTRANSACTION> </CFLOCK>
Many thanks in advance!! |
|
jfitz
Junior Member
 
USA
345 Posts |
Posted - 03 August 2003 : 21:31:29
|
There are a couple of good books specifically about stored procedures in MSSQL. If you are already familiar with creating moderately complicated SQL statements, then stored procedures will not be totally foreign, but, writing stored procedures is programming, and techniques of good program design apply to stored procedure design as well. I suggest you grab a copy of The Guru's Guide to Transact-SQL if you aren't already conversant with SQL programming. |
--Jördan It's a wasted day if you don't spend at least part of it flying upside down. |
 |
|
|
Topic  |
|
|
|