Wordpress with SQL Server backend stores "????" instead of Cyrillic characters - wordpress

I have a wordpress installation on sql server 2008 r2. I am not a php man myself, so I'm not really sure how to attack the php side.
On the sql server side I can see question marks being stored, so this is not just a presentation issue.
I am thinking maybe the insert itself does not have an N before the string.
Can anyone point me to where I can start looking in the php files, or even better is there is a known solution for this issue?
Edit: I already checked and all fields are nvarchar.
Edit 2: I just manually inserted the data into the DB and it is stored correctly.

Check your wp-includes/wp-db.php file.
Wpdb is the core database object used for db operations.

Related

Visual Studio Server Explorer doesn't display the correct table with DB2 connection

To start off, I'm new to Visual Studio and DB2, so please bear with me. I've been reading different books and will be starting classes soon, but I'm completely stumped with this.
I have a webform set up using VB.
In the web.config file, I've added <add name="rfqAS400TEST" connectionString="Server=serverIP; Database=RFQTST; UID=userid; PWD=password; CurrentSchema=RFQTST;" providerName="IBM.Data.DB2"/> inside of the <connectionStrings> tag. However, when I look at the connection in the Server Explorer, the tables dropdown shows HUNDREDS of tables, none of which are the table I referenced in my connection string.
I've tried to modify the connection and filter by the schema and DbName with no luck - it still only shows the hundreds of other tables instead of the one I want.
When I manually specify a custom SQL statement (SELECT * FROM <library>.<filename/table>) in the GridView Configure Data Source wizard, the GridView displays the records as it should, so I know the connection to the correct library and file is working.
It just seems strange that I have to manually type the statements because the correct table fails to show up in any of the wizards or the Server Explorer. Any suggestions or thoughts would be GREATLY appreciated.
Update
Out of curiosity, I tried to set up the connection using the ODBC datasource and the system data source name as IBM i Access for Windows ODBC. This displays extra tables as well, but it includes the tables that I've been wanting all of this time. This just confuses me more. Does that mean the DB2 connection (even though it technically is connected) is set up incorrectly?
The CurrentSchema is just a proxy for the SET CURRENT SCHEMA, to name the implicit schema qualification, for unqualified table-references. The tables that appear in an ODBC API request such as via SQLTables(), are unrelated to that current_schema.
A generic [db2] provider does not acknowledge\reflect the distinct attributes of the DB2 for i, whereby the database is [in a simplified sense] the entire system; the catalog API calls reflect either that, or that the schemas that are part of the library list concept. With the IBM® i Access ODBC driver, there are Connection string keywords for Connection Properties and Server Properties.
The following Redbooks publication and SQLTables Description may have some value.

Export Sitebuilder SQL Server database to Excel | CSV | MySQL

I need to migrate a customer's site which happens to be hosted in a remote Win32 environment with Sitebuilder, Plesk, SQL Server and ASP or ASP.Net, I'm not sure.
I'm used to LAMP environments, so I don't know what to do with all the files in this server. Sitebuilder and SQL Server are also new to me.
I only have access to the FTP files and to the Plesk panel control, but it doesn't even acknowledge the existence of any SQL Server database (as it usually does with MySQL databases).
So far I've only been able to think of these two options:
Code an ASP script that writes down the database content into CSV files (wouldn't know where to start).
Code a script that retrieves the data directly from the HTML pages (long, painful, error prone and not useful to access data available only to logged in users).
So my question is: from your experience, knowledge of this platform, and point of view, which would be my best option?
Thank you very much in advance in my first question here. Regards,
UPDATE: I've managed to access the server (Windows 2008 server + SQL server 2008) using remote desktop. I guess I should be able to export the database now. I'll check Management Studio to see if it can help in the process.
It sounds odd that it doesn't support remote connections, but if you want to do it from within your asp-pages, the following links might be good starting points:
Want to script all objects which depend on a SQL Server table
http://www.dotnetfunda.com/codes/code32-how-to-generate-create-table-script-for-all-tables-in-sql-server-database.aspx
https://dba.stackexchange.com/questions/20355/generate-create-script-for-all-indexes

Migrating from Access db to SQL Server 2008 with frontend ASP.net

I did the upsizing of access database to sql server. My question is, do I have to change all my datasources in webpages manually or is there any way to do that without much effort.
Edit: The queries I have uses user input I mean #WhichUser and sql server throwing error for those asking me name the scalar variables. Normally # symbol works in sql server but not in mine. Is this because I am using an express edition or is there anything else that I need to add to the query. Thanks!
I found that I named Control Parameter names same as column names while I used Which infront of every input parameter like #WhichUser so was solved by adding WhichUser as name to the control parameter.

Symfony2 - Doctrine autoescaping of input fields

I'm using Symfony2 version 2.0.5 with the bundled Doctrine ORM solution. Since I changed the environment from dev to prod, all my form inputs are escaped, when persisting to database. Now I know this is the correct behaviour for preventing sql injections, but when fetching the data back, the string isn't unescaped. Because I directly save JSON strings to database this is causing me big problems.
Also everytime I update this data the string gets escaped again and again.
My Question is, can I deactivate the escaping for certain fields, should I? Or can I unescape the values when fetched from the DB.
And why is this only happening in prod environment? Is this intended?
Best Regards, David!
This is probably caused by PHP configuration — not by Symfony or Doctrine. In php.ini, find all options starting with magic_quotes_ and set them to Off. Don't forget to restart the server.

Creating Membership DB (ASPNETDB) on remote server?

I'm building a web application which soon I'll be promoting to production. This application has a login screen, as you know I used the integrated DB for developing. Now I want to move this database to a full SQL Server 2005. I'm using the aspnet_regsql.exe to create my membership tables and stored procedures in the SQL Server 2005 but I'm getting an error:
An error occurred during the execution of the SQL file 'InstallMembership.sql'. The SQL error number is 207 and the SqlException message is: Invalid column name 'FailedPasswordAnswerAttemptWindowStart'.
I google this for half of the day already and I can't seem to fine what's wrong, does anybody have ANY ideas on what am I doing wrong here? Any help will be really appreciate it.
The easiest way to deploy a brand new database to a remote server is to just publish the database from within Visual Studio. Once you do that you have the scheme and data all in one script. You then access your server either via a local SQL manager connection or a remote manager and run the script on your remote database.
The site 4GuysFromRolla has a nice little walk through with graphics which describe how to accomplish the publishing of your local database to your hosted one.
Good luck, and hope this helps you out some.
Go through the *.sql script file and see where that column reference is. Then you'll be able to see what exactly the script is doing to cause this error. My guess would be that it is getting caught up on referential integrity. If it is trying to create a foreign key constraint that that table/column does not exist then you'll see that error.
But back to the original question at hand. You don't need to recreate your whole database. That script file is to lay down the Membership for an empty database. If you have a working dev database you can just back it up and restore it to a production instance. No need to rebuild the membership database objects.

Resources