Thursday, October 1, 2015

System.Data.SqlClient.SqlException
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_*". The conflict occurred in database "aspnet*", table "dbo.*", column '*ID'.

Uh oh... Not sure what this means?  This one is pretty easy. It means your referenced table doesn't have a corresponding row with a matching key.

Fix: Either manually add a row via SQL Server Management Studio or add a row via code.

Monday, January 3, 2011

Node.js - Windows 7 Install - CXX Error

While attempting to install Node.js on a Windows 7 box for development I came upon this error using the install directions at https://github.com/ry/node/wiki/Building-node.js-on-Cygwin-(Windows):
"wscript:173 error: could not configure a cxx compile"

Steps to fix:
"exit" cygwin
Run As Administration: C:\cygwin\bin\ash.exe
$ /bin/rebaseall -v

exit ash.
Reopen cygwin.
cd node
./configure

That should fix it.

Monday, December 27, 2010

Javascript Frameworks and more...

I'm currently working on some new "web applications", that is traditional desktop type programs that are delivered through a browser, and need a space to store my research. Thus, the Interwebs will get to take advantage of my research. This will be an ongoing post...

You'll notice most of this will be client-side focused and jQuery based. Sorry, that's the way it is. I'm not so concerned with the server-side because if I do this right, it will be server agnostic. Although, I'll probably implement in C# or PHP.

jQuery
jQuery UI
jQuery Mobile

Application Frameworks

Images

Color Picker

Thursday, September 2, 2010

XDebug Loading - Windows, ZWAMP

This one's a quickie.

I'm currently developing some code in PHP 5.3 on my local Windows 7 64-bit box using ZWamp and Postgres. I was trying to get XDebug running and couldn't get it to load properly

Well, it's all about semantics.
  1. You have to load with "zend_extension". It will not load completely/correctly with "extension". You will get "XDEBUG NOT LOAD AS ZEND EXTENSION".
  2. zend_extension does not take into account "extension_dir". You must use the full path to XDebug.
  3. zend_extension does not give any warnings when the extension does not load using zend_extension... At least it doesn't crash the starting of Apache like an incorrect extension path.
  4. DO NOT USE "zend_extension_ts". This was deprecated as of PHP5.3.
So, how did I get it to work with ZWamp?

zend_extension = "/.sys/php/ext/php_xdebug-2.1.0-5.3-vc9.dll"

Tuesday, August 24, 2010

X Redirecting to Myspace - Continued

So it seems we have narrowed down the problem...

Cisco Linksys Router, specifically the WRT-160N model. It appears there is a bug in this routers recursive DNS implementation in firmware and Linksys refused to acknowledge this.

Solution (this appears to fix it):
Configure your local computer to use DNS servers INSTEAD of getting them through DHCP (when the router gives your computer networking information).

Google and OpenDNS both provide Public DNS servers.

Good luck! Let me know in the comments if you are having this problem with other routers.

Thursday, December 3, 2009

SSIS Slow - Ole DB Data Flow Optimazation

Do you build SSIS (SQL Server Integration Services) Packages?
Are you constantly running into Visual Studio acting sluggish or giving you "Microsoft Visual Studio is Busy"?

In my case, I use views a lot when I'm querying my source data (for reasons of maintainability). When you use views in an OLE DB Source, anytime you change the scope of what you are working on, e.g. jumping back to the control flow and then back into the Data Flow, Visual Studio rebuilds its meta-data and does validation checks to see if source or destination attributes have changed.

Resolution
Set AccessMode to "SQL Command"
And set SqlCommand to a Select query of your view.
Example:
SELECT * FROM v_MyView

Why does this work?

"...it calls OpenRowset in the validation phase to retrieve column metadata, and later in the execution phase to read out the data.

Testing has shown that using a SELECT statement can be at least an order of magnitude faster, because the adapter issues the specified command directly through the provider and fetches the data using sp_prepare without executing the command, avoiding the extra roundtrip and a possibly inappropriate cached query plan."

If you have any questions... Just ask, I'll be happy to assist where I can.

Wednesday, November 18, 2009

Facebook Redirects to Myspace

My wife just came across this interesting issue.

When she goes to http://www.facebook.com/ it redirects to a Myspace.com user's Samuel Garcia (SR388) profile.

Quickest resolution
For Vista and above:
is to go to your start menu -> All Programs -> Accessories. Right click on Command Prompt and click "Run as Administrator". Approve the escalation.

Copy and past the following command


ipconfig /flushdns


You should get...

Windows IP Configuration

Successfully flushed the DNS Resolver Cache.

Next clear your browsers cookie and cache... and maybe restart your browser for kicks.

I hope that helps.

FYI: I'm trying to track down why this is happening. I believe it has to do with a recently discovered DNS exploit. I'll continue to look into it.

In the mean time, if you could please reply to this post with your Internet provider and general location, city/state I would be much obliged so I can attempt to develop a pattern.

Thanks!
Mike