March 10, 2010

Pages


Search Site


Topics



Archives

Entries Tagged as 'SQL Server'

Pay Pal IPN

December 22 2009 by admin

Merry Christmas and Ho Ho Ho.  I'm giving away my paypal IPN module for free for all of you.  It has everything you need to set up a paypal instant payment notification.  You'll need to modifiy the emails and there are sections noted for additional expansion.  MS-SQL included also.  No notes or docs, but out of the pipe this will handle INP transactions on your ColdFusion server.

Read more...

Posted in CFWebstore Modifications in Action | SQL Server | PayPal | 2 comments

T-SQL Script to create a US States Table

December 16 2008 by admin
Down and dirty. Pass it around. GO
/****** Object: Table [dbo].[US_States] Script Date: 10/07/2008 15:32:39 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[US_States](
   [ID] [int] IDENTITY(1,1) NOT NULL,
   [Name] [nvarchar](50) NOT NULL,
   [Abbreviation] [nchar](2) NOT NULL
) ON [PRIMARY]

insert into US_States values ('Alabama' , 'AL')
insert into US_States values ('Alaska' , 'AK')
insert into US_States values ('Arizona' , 'AZ')
insert into US_States values ('Arkansas' , 'AR')
insert into US_States values ('California' , 'CA')
insert into US_States values ('Colorado' , 'CO')
insert into US_States values ('Connecticut' , 'CT')
insert into US_States values ( 'Delaware' , 'DE')
insert into US_States values ( 'District of Columbia' , 'DC')
insert into US_States values ( 'Florida' , 'FL')
insert into US_States values ( 'Georgia' , 'GA')
insert into US_States values ( 'Hawaii' , 'HI')
insert into US_States values ( 'Idaho' , 'ID')
insert into US_States values ( 'Illinois' , 'IL')
insert into US_States values ( 'Indiana' , 'IN')
insert into US_States values ( 'Iowa' , 'IA')
insert into US_States values ( 'Kansas' , 'KS')
insert into US_States values ( 'Kentucky' , 'KY')
insert into US_States values ( 'Louisiana' , 'LA')
insert into US_States values ( 'Maine' , 'ME')
insert into US_States values ( 'Maryland' , 'MD')
insert into US_States values ( 'Massachusetts' , 'MA')
insert into US_States values ( 'Michigan' , 'MI')
insert into US_States values ( 'Minnesota' , 'MN')
insert into US_States values ( 'Mississippi' , 'MS')
insert into US_States values ( 'Missouri' , 'MO')
insert into US_States values ( 'Montana' , 'MT')
insert into US_States values ( 'Nebraska' , 'NE')
insert into US_States values ( 'Nevada' , 'NV')
insert into US_States values ( 'New Hampshire' , 'NH')
insert into US_States values ( 'New Jersey' , 'NJ')
insert into US_States values ( 'New Mexico' , 'NM')
insert into US_States values ( 'New York' , 'NY')
insert into US_States values ( 'North Carolina' , 'NC')
insert into US_States values ( 'North Dakota' , 'ND')
insert into US_States values ( 'Ohio' , 'OH')
insert into US_States values ( 'Oklahoma' , 'OK')
insert into US_States values ( 'Oregon' , 'OR')
insert into US_States values ( 'Pennsylvania' , 'PA')
insert into US_States values ( 'Rhode Island' , 'RI')
insert into US_States values ( 'South Carolina' , 'SC')
insert into US_States values ( 'South Dakota' , 'SD')
insert into US_States values ( 'Tennessee' , 'TN')
insert into US_States values ( 'Texas' , 'TX')
insert into US_States values ( 'Utah' , 'UT')
insert into US_States values ( 'Vermont' , 'VT')
insert into US_States values ( 'Virginia' , 'VA')
insert into US_States values ( 'Washington' , 'WA')
insert into US_States values ( 'West Virginia' , 'WV')
insert into US_States values ( 'Wisconsin' , 'WI')
insert into US_States values ( 'Wyoming' , 'WY')
GO

Posted in SQL Server | 3 comments

SQL Injection attacks

August 11 2008 by admin
First thing to say about this subject is this: If you aren't using stored procedures and scoping your variables with cfprocparam or cfqueryparam (if you use a plain ol' query) then you are moments away from a SQL injection attack and a potential total loss of data.

Read more...

Posted in SQL Server | 4 comments

The conversion of the varchar value overflowed an int column. Maximum integer value exceeded.

December 04 2007 by admin
I just spent the weekend bashing my head against a wall when my PayPal IPN application mysteriously started spewing this error: Macromedia][SQLServer JDBC Driver][SQLServer]The conversion of the varchar value '242062181872839? overflowed an int column. Maximum integer value exceeded. I couldn't understand it. I set the invoice column in the table to accept varchar(255). It has worked flawlessly for the past 3 years, and now, a new client allows PayPal to create an invoice number for them and return it in the IPN. No biggie, its been working for them as well. But on Sunday morning any invoice that was 15 chars or more long returned that error and we lost the IPN (not really, I write it first to a flat file). So I went over to Pinal Dave's site (http://blog.sqlauthority.com) to see if I could figure anything out but nothing helped. So I opted to start a new table and give my invoice column the type numeric. We'll see how it works. Perhaps I was sleeping in SQL class. Has anyone seen this? Could the DBA have made a change to the shared SQL server that would have caused this error?

Posted in SQL Server | 3 comments