Question:
How to use SQLiteBlob when rowId is not an integer?

Here is the sample code to replace SQLLiteBlob by another method when the rowId is a string.


    public void WriteContent(Stream contentStream, string table, string rowId)

    {

        // ToDo : Find Solution for Writing to Blob as RowId is no more an integer

        using var writeStream = new SqliteBlob(this.executionContext.GetConnection(), table, ColumnName, rowId);

        contentStream.CopyTo(writeStream);

    }


You better make it integer.
Rowid can only be integer. If not, means you are using table"without rowid" .> >https://www.sqlite.org/lang_createtable.html#rowid

Without rowid, Blob I/O wouldn't work.
>>https://learn.microsoft.com/en-us/dotnet/standard/data/sqlite/blob-io
>>https://www.sqlite.org/c3ref/blob_open.html 



Suggested blogs:

>How to delete duplicate names from Array in Typescript?

>How to do PHP Decryption from Node.js Encryption

>How to Set up the Android emulator?

>How to Set up the local environment for Angular development?

>How to solve encoding issue when writing to a text file, with Python?

>Step by Step guide to Deploy Terraform in Azure using GitHub Actions

>Testing react components using Hooks and Mocks

>Use Firebase Realtime Database with ASP.NET MVC App

>Use of Singletons in .NET Core in AWS Lambda

>What are common syntax errors and exceptions in Python


Ritu Singh

Ritu Singh

Submit
0 Answers