wanted to keep track of these somewhere
Random Coding Links - #1
wanted to keep track of these somewhere
Initializing JDBC driver …
Driver class MS SQL JDBC Driver
Opening connection …
Connection jdbc:jtds:sqlserver://127.0.0.1:1434/databasename;user=sa;password=;charset=utf-8;
Initializing JDBC driver …
Driver class MS SQL JDBC Driver
Opening connection …
Connection jdbc:jtds:sqlserver://127.0.0.1:1434/databasename;user=sa;password=;charset=utf-8;
The schema could not be reverse engineered (error: 0).
ReverseEngineeringMssql.reverseEngineer :I/O Error: Connection reset
Details:
net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2277)
net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:599)
net.sourceforge.jtds.jdbc.ConnectionJDBC2.(ConnectionJDBC2.java:331)net.sourceforge.jtds.jdbc.ConnectionJDBC3. (ConnectionJDBC3.java:50)
net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:178)
java.sql.DriverManager.getConnection(Unknown Source)
java.sql.DriverManager.getConnection(Unknown Source)com.mysql.grt.modules.ReverseEngineeringGeneric.establishConnection(ReverseEngineeringGeneric.java:141)com.mysql.grt.modules.ReverseEngineeringGeneric.getVersion(ReverseEngineeringGeneric.java:161)com.mysql.grt.modules.ReverseEngineeringMssql.reverseEngineer(ReverseEngineeringMssql.java:164)sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.mysql.grt.Grt.callModuleFunction(Unknown Source)
ok, so close the migration tool reopen and go through the same process, exact same behaviour, clicking the back button brings me to the original screen where the MSSQL connection information was entered, everything is as it was, try to connect again and this time another java stack trace, the important part was this line - ’I/O Error: DB server closed connection.’ - Weird
a google search led me here - http://bugs.mysql.com/bug.php?id=20674
Using the ‘SQL Server Configuration Manager’ I had to set the ‘SQL Server 2005 Network Configuration’ -> ‘Protocols for MSSQLSERVER’ -> TCP/IP to Enabled
doing this set my default port back to 1433 (actually that is the one I used, xp_readerrorlog shows the database listening on both 1433 and 1434), so re-connecting with the migration tool and using the 1433 default port worked and I was on my way…
so every table fails to migrate except 2? well I guess the migration tool could be better, lucky for me I only had 12 tables going here, I had to update the migration code for all of these tables
`is_active` TINYINT NOT NULL DEFAULT (1),
had to be changed to
`is_active` TINYINT NOT NULL DEFAULT 1,
yes removing the () from the default value - now that sure is a pain. It was only occuring on types of tinyint - these were coming from MSSQL bit datatypes, could be an issue only in that one case?
Changing Perceptions
We needed to change perceptions of electric vehicles in a big way. To make electric cars a viable alternative, we set out to build one that was gorgeous and thrilling to drive.
Our first car, the Tesla Roadster, isn‘t a plan, pipedream or prototype; this car exists and is for sale now. It‘s a no-compromise driver‘s car that can accelerate faster than a Porsche 911 and hit a top speed of nearly twice what the law permits. With a range of more than 200 miles on a single charge, you can use it all day long and not worry you‘ll run out of juice. Just plug it in at night the same way you drop your cell phone into its charger, and sleep well, without guilt.
Just the Beginning
While the Tesla Roadster‘s sticker price is in a league with other
high-performance sports cars with similar specs, we recognize it‘s out of reach
for a lot of people. We consciously chose to develop a high-end sports car as
our first car in order to develop the “performance DNA” from which we could
create other electric vehicles. Our next model will leverage the Tesla
Roadster‘s technology, resulting in a less expensive sports sedan that we can
sell at higher volume.
I don’t want a sports car and definitely won’t be spending $90,000 on a car of any sort, but I hope they can get a lower cost sedan or wagon on the road in the next few years.
and it kept on printing my error message as Errors\nError message 1\nError message2 - note that the newline characters were being escaped and rendered literally# rjs render a javascript alert on the client
page.alert ’Errors\nError 1\nError 2’
# this one will output the newlines in the javascript alert message
page.alert ”Errors\nError 1\nError 2”
# rjs file
page.alert “#{get_message_for_show_server_error}”# helper file
def get_message_for_show_server_error
__s = ”Errors “
__@product.errors.full_messages.each do error
____s = s + ”\n” + error.to_s
__end__return s
end