Azure Data Studio select correct encoding - sql

I have a problem with encoding in ADS. I set in all settings encoding on "UTF-8 with boom". And when I open a new query then ok "UTF-8 with boom" encoding is set but when I open some files with my T-sql store procedures then always azure data studio open it with "UTF-8" encoding without boom.
How to fix that?

Related

how can I get the data out of an .fb file?

I'm working with a company trying to setup a new database system as their old database software has gone out of business. All the data is in a .fb file that is encrypted (You used to have to get backups 'unlocked' before they would let you use them).
I've managed to get a copy of the database (I think it's unencrypted as I copied it while the database was open and then changed the copied files permissions using terminal).
The problem is that it's a .fb file and I can't find a way to 'open' it to browse the data...
Any Ideas?
Generally speaking, data stored in relational databases aren't just stored as ascii csv files. So you won't be able to just open up a .fb file in a text editor and grab the data.
If you're still able to query the database, you will need to have the frontbase server generate a dump of the data into a flat file.
See the frontbase documentation for backup and restore. Specifically 4.9.1. Exporting Schema and Content Data:
WRITE ALL OUTPUT('<output-directory>' [,'YES']);

Unrecognized characters in DB Browser for SQLite

I opened up a Northwind database (northwind.sqlite3) using DB Browser for SQLite (Version 3.9.1).
For some product names, I couldn't get the right names displayed no matter what I did, including:
I changed new line characters options
I changed Preferences options
I checked the outputted csv using Excel and Notepad with different encoding
Still couldn't figure out how to properly show the characters...Any help is appreciated.
The problem may be either that data have been added to the database in an incompatible encoding (e.g., pasting data from Microsoft products into a UTF-8 database can do this) or that the DB Browser isn't displaying the data in the correct encoding. To fix the former problem you may have to edit the data, or possibly change the database encoding. You can't change the encoding of a SQLite database on the fly, so you would have to export the data and import them into a new database with the encoding that is actually used. If it's just a DB Browser display issue, right-click on the table header and choose the option to change the display encoding.

Create a file in SQL Server 2008 R2 and convert it to image datatype without writing it to disk?

I am working in SQL Server 2008 R2.
I am currently generating PDF reports by building the pdf as plaintext (based on this: http://www.sqlservercentral.com/articles/Miscellaneous/creatingapdffromastoredprocedure/1104/ )
It builds the body in plaintext then saves it to a folder using sp_OACreate with the .pdf extension. It is actually faster than SSRS in this case; we are generating 5k-100k pdfs (historical transaction data for our customers' customers)
I then have to load these files into an image column so the clients can access their report through the software.
Is there a way to generate the file and convert it to an image without writing it to the disk and then reloading it?
I cannot change the software, the file must be presented to the client when they click the button in the interface.
I cannot change the database. I have these files saved as image datatypes. I cannot change this to any other data type. The files are all less than 20k in size.
I cannot implement filestream due to PCI Compliance security reasons.
For SQL Server you can program stored procedure on .NET language (C#, VB...) Inside .NET assembly write code for generating PDF reports. Then you only have to execute this stored procedure and save it result to database table.

How do you Create a Disk from from a MemoryStream (VB.net)

I'm working on a project in VB.Net (2010) where I'm extracting files from an Document Management System.
The Files reside on the network, and information about the files are in a SQL 2005 Database and have been encrypted with the Encryption Stream (System.Security.Cryptography.RijndaelManaged)
I have retrieved the file, and decrypted them, but I'm trying to find out how to write the stream back to a file. I know the file type (which is stored in a SQL DB)
I can't find a solution in any of the VB files or the MS site.
Any help would be appreciated.
To write a MemoryStream to a file just use the WriteTo method.
Using ms As MemoryStream = GetDecryptedMemoryStreamFromNetworkFile("network_file_path_goes here")
Using fs As FileStream = File.OpenWrite("new_file_path_goes_here")
ms.WriteTo(fs)
End Using
End Using
Option 1 (obvious) is to create a temporary file on the disk.
Option 2 is to take something like our Callback File System product, which lets you do exactly what you need and many of our customers use it for scenarios like yours, i.e. represent data taken from document management systems and similar storages.

SQL Server: How to open .PRC files?

I have old .prc files (SQL Server Stored Procedures) which have exported from SQL Server 2000. Now when I try to open a .prc file using SSMS 2008, I get a bunch of chinese characters and other odd characters. I tried a solution found here, but it did not help.
Can you open the files in a regular text editor, e.g. Notepad or something??
As far as I remember, the SQL Server 2000 tools used to use ANSI / ISO-8869-1 encoding for their files, while newer Mgmt Studio version expect UTF-8 or UTF-16.
So my suggestion would be to open those *.PRC files in an editor and store them as *.SQL files using UTF-8 encoding. After that you should be able to open them in SSMS 2008 without problems.
Once I'd added PRC and UDF suffixes, ssms still ignored the changes if I used "recent files" to re-open the file was I working on.
I had to use File->Open to pick up the new suffixes. Thereafter "recent files" worked.