I tried to upgrade my WordPress to 2.9.2 but I had to upgrade my database MySql first since WordPress 2.9.2 requires higher MySQL version. Just like I usually did with the database backup routine, I used “mysqldump” command to export data from MySQL 4.0 and then used “mysql” to import data into MySql 5.0. Everything seemed OK at the first, but I later on found out all my Chinese characters turned into non-readable mess characters.
The problem was my host provider, 1 and 1 located in Europe, uses “latin1-german1_ci” as default database collation. And the dumped SQL script from the MySql 4.0 does not have the database collation information even it is in UTF-8, so all new tables created in the new MySql 5.0 have the latin1_german1_ci as the default collation and latin as the default character set.
Continue reading ‘How to correctly import no-English (UTF-8) characters from MySql4 into MySql 5.0 with mysqldump’
Related posts
Challenges:
I tried to connect to Oracle database in SharePoint (MOSS 2007). But got the following error when I tried to create a Database connections in Designer 2007.
1), Use custom connection string;
2), Select Microsoft .NET Framework Data Provider for Oracle as the Provider Name;
3) Post the below as the Connection String:
Password=<passwd>;User ID=<userID>; Data Source = <mydatasource>; Persist Security Info=True; Provider=OraOLEDB.Oracle;
4), It seemed the Oracle db can be connected, but could not find the root catalog since the "Initial Catalog=root;" was appended to the above connection string automatically.
5), and the error message is:
Server Error: An error occurred while retrieving the list of Tables from the root Database: The query you are trying to execute contains syntax errors.
I searched on the Internet, and was told there is a way to use BDC(Business Data Catalog). But I just need a simple way to show Oracle data on a SharePoint page. BDC connection is too much for me at this point.
Continue reading ‘Issues with creating Database Connections to Oracle in SharePoint Designer 2007 (Resolved)’
Related posts
Challenge:
Create a form in InfoPath 2007 and implement a SharePoint Workflow to it for approval processes. In each step, a Status field in the InfoPat form should be updated automatically according to the change of workflow task status. So a different view in the InfoPath can be opened based on the Status field in the form.
But after the InfoPath was published to the SharePoint (MOSS 2007 with InfoPath Form Services turned on) as Document Library and Content type, the Status field could not be displayed when “Set Field value in Current item” action was selected in the workflow design. Even it was promoted to be available in the SharePoint document library.
Continue reading ‘How to pass InfoPath form fields to SharePoint workflow but hide from Document Library item properties’
Related posts
Published on
November 19, 2009 in
PHP.
Recently I tried to boost up the performance for one of my Joomla powered web site. So I enabled the System Cache plug-in through Plug-in Manager which is a separate tool from the regular Cache setting in Global Configuration. What does this cache plug-in do? In one simple sentence, this plug-in creates page-level cache files which can serve to the afterwards visitors to reduce the burden of calling database each time.
At the first few days, everything was working fine with some kind of performance gains on this Joomla site. Even at some times it caused mirror inconveniences when I was updating the contents or modules. I had to delete the cached pages to see my new changes. But I was still happy.
Till last week, some of my other web sites started to act weird. I could not upload new pictures, some of web sites threw the 500 Server error (see the below of an example):
“Error 500 – Internal server error
An internal server error has occured!
Please try again later.
Continue reading ‘How to resolve the System Cache plug-in causing file quota issue in Joomla’
Related posts
Disclaimer: The following information is intended for informational purposes only.
Just read the hacker quarterly magazine 2600 while I am in the SQL training. And I found out the information on the Page 19 is very interesting. Within it, the author taught how to generate the valid credit card numbers to fool some free trial web sites since these web site will not verify the credit card is real, but only to check these numbers are valid.
I think it will be a good point for us, as developer, to use these formula to do some simple credit card numbers validation as well in our code. Or just simply to generate some fake-real credit card to do the application testing.
Continue reading ‘How to generate valid Credit Card numbers and validate in asp.net’
Related posts
I was thinking to update some of my ASP.net applications which are sending alerts to subscribers via emails. The update will allow them to send out alerts as SMS (Short Message System) or text messages to users’ mobile phones.
I believe we need some third-party add-ons in the ASP.NET code to accomplish the above. But in North America, there is a work-around to do so since most of the cellular providers have a email-like system for their phone numbers.
Continue reading ‘Send Free Text Messages via SMTP in applications’
Related posts
I did not know it was IE 8 made my website act weird till after I spent a lot of time on the code reviewing and testing on different browser. Well, to be honest, it was a trick issue. Since all of my web pages look great in IE 8 on the test web servers and development servers, and even on the production servers if we are using internal IP. But all of our website’s drop down menu items messed up in IE 8 if we access to the production servers with the external domain and IPs. Later on, when we accidently switch the IE 8 to Compatibility View mode and these style issues went away, we concluded that it was IE 8 upgrade caused the problem.
And we also learned from the IE 8’s Compatibility View Setting that all Intranet web sites are displayed in Compatibility View automatically. That was why our website problem could not be spotted internally until a complaint email from the customer outside.
Continue reading ‘How to get the web site style back in IE 8′
Related posts
As a web developer, soon or later you will write some AJAX scripts on your web pages. One of interesting AJAX features is the animated loading image (see the image on the right) which is telling the visitors to be patient while the system is processing requests.
Of course, I am using a lot of loading images in my web codes too. But sometimes I just wanted to be different, I want my loading images to be branded with my own identity.
I can launch the Photoshop to do some image editing, but recently I figured out an easier way to accomplish the above. And I believe you can do the same as long as you would like to spend a few minutes reading this post.
Continue reading ‘How to add and customize AJAX loading image on web pages’
Related posts
I am developing a web application with ASP.NET and Oracle database. In the Oracle, there is a table with a “City” field whose data is in Upper Case. To make the data look good, I format the city name in the Stored Procedure with InitCap function from Oracle as the blow:
SELECT DISTINCT INITCAP(F_city) AS CITY FROM CITY_TAB
ORDER BY CITY ASC;
Now, I need to accomplish the same in my VB.NET code. Of course, based on my previous knowledge I was not aware of such String Function in VB.net the similar as the INITCAP. And I used to write a function to loop all strings and put the first letter in Capital when we were coding in VB script (ASP).
This week, I found out a easy way to do so in ASP.NET. Now you can use StrConv to get the formatted string. For example:
Dim strCity as String = strConv(strCity, vbstrconv.vbproperCase)
Enjoy programming!
Related posts
Got an email forwarded by the co-worker, saying the Microsoft ADO.NET team is going to deprecate OracleClient as a part of their ADO.NET roadmap.
The Decision
After carefully considering all the options and talking to our customers, partners, and MVPs it was decided to deprecate OracleClient as a part of our ADO.NET roadmap.
Recommendation and Guidance:
System.Data.OracleClient will be available in the upcoming 4.0 release of .NET Framework; however, it will be marked as deprecated. This will have no impact to existing applications and these applications will continue to work as expected. Developing new applications which use OracleClient will be supported; however, warnings will be raised if the applications are compiled against .Net 4.0. Once compiled, no warnings or errors will be generated while running these applications. We strongly recommend customers to use our partners’ ADO.NET Provider for Oracle instead of continuing to use Microsoft’s OracleClient for new application development.
Continue reading ‘System.Data.OracleClient will be deprecated in .net framework 4.0′
Related posts
Today one of my co-workers did the trouble shooting and resolved this stupid problem together with me, and suggested put on the blog to share it. So here we go.
To make one of our internal web application authentication method simply, I decided to use Windows authentication and put the only one user in the web.config. The following are what I put in the web.config:
<authentication mode=”Windows” />
<authorization>
<allow users=”DOMAINNAME/USERID”/>
<deny users=”*”/>
</authorization>
But the web form won’t authenticate me even I put the right user name and password, a windows logon prompt always jumped out.
I changed to <deny users=”?” /> then everyone can get in.
By the way, I have made the change in IIS to disable the anonymouse authentication and enable the Integrated Windows Authentication.
Finally, we figure out that we used the wrong slash in the user name. We should use backward slash “\” instead of the forward slash “/”. The working code should be
<authentication mode=”Windows” />
<authorization>
<allow users=”DOMAINNAME\USERID”/>
<deny users=”*”/>
</authorization>
Gosh, never paid attentions on it before. I used both of them in asp.net 1.1.
Related posts
Today, got bothered by two issues when I was doing the asp.net development.
First, all of the sudden, the “~” symbol in my code did not work anymore after I did some modifications. For example, I have one line of code to re-direct the users to an error page (/MyApp/App_Include/ErrorPage.aspx) like the below.
Response.Redirect("~/App_Include/ErrorPage.aspx?aspxerrorpath=" & Me.Page.Request.Url.ToString(), True)
But when any errors raised in some web forms in the location of /MyApp/Forms/somepage.aspx, I could not be re-directed to the ErrorPage.aspx, instead I got a 404 page not found error. It seemed the system was trying to find /MyApp/Forms/~/App_Include/ErrorPage.aspx.
Continue reading ‘two issues of asp.net development’
Related posts
Published on
May 11, 2009 in
PHP.
I was working on the Joomla 1.5.9 and tried to add one form in an article, but the <form> tag got ripped off. To get it back, you will have to do at least two changes.
- Turn off the WYSIWYG Editor (i.e. TinyMCE editor) you were using. To do so, you can update the user profile by choosing no editor for yourself.
- Then you need to update the Filterings Options settings in Global Parameter, otherwise all <form> <input> tags will be kept by turning off WYSIWYG editor, but the ACTION attribute in the <form> will be filtered out by Joomla.
Continue reading ‘How to add your own HTML tag in article content of Joomla 1.5.x’
Related posts
Since Wednesday, all developers’ machines could not load asp.net applications on Visual Studio’s development servers. And we even could not debug, build the solution and could not Copy Website either; and could not drag/drop the AJAX Extension toolkit controls to the web forms.
The error message when we loaded the web application was the following:
Server Error in ‘/MyAPP’ Application.
Access is denied. (Exception from HRESULT: 0×80070005 (E_ACCESSDENIED))
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
……
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
……
[FileLoadException: Could not load file or assembly 'AjaxControlToolkit, Version=1.0.20229.20821, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. Access is denied.]
Continue reading ‘Fix Access is denied (Exception from HRESULT: 0×80070005 (E_ACCESSDENIED)) on local machines’
Related posts
Blog Comments