Readdy Write  
0,00 €
Your View Money
Views: Count
Self 20% 0
Your Content 60% 0

Users by Links 0
u1*(Content+Views) 10% 0
Follow-Follower 0
s2*(Income) 5% 0

Count
Followers 0
Login Register as User

Changes from SqlServer to SQLite

05.07.2018 (👁3897)

Changes from SqlServer to SQLite

04.07.2018 (👁25)


 

You have to change all that when you switch from SQLserver to SQLite

 

1) TOP 1 -> LIMIT 1

SELECT TOP 1 Fields becomes WHERE Contition LIMIT 1

 

2) NOT NULL

NOT [Field] IS NULL becomes [FIELD] IS NOT NULL

 

3) DataTable -> DataReader

DataTable becomes DataReader

 

4) EOF-> HasRows

  .EOF == true becomes .HasRows == false


5) SYSDATETIME() wird CURRENT_TIMESTAMP

 [dtScan] = CURRENT_TIMESTAMP"//SYSDATETIME()


 

https://readdy.net/User_Files/Notes/Images/Image_537_0_blog.jpg" width="417" height="268">

 

string sSQL = "SELECT [IDProject_On_Server] FROM tbl_Details WHERE [dtDeleted] IS NOT NULL";

            SqliteDataReader dataReader = clsDB.Get_DataReader(sSQL);

            if (dataReader.HasRows == true)

            {

                while(dataReader.Read())

                {

                    //---< NoMatch: Delete on Server >---

                    string IDProject_on_Server = dataReader["IDProject_on_Server"].ToString();

                    fx_Log("delete byWebsite" + IDProject_on_Server);

                    //</ nomatch >

 

 

 

Data Reader

SqliteDataReader dataReader = clsDB.Get_DataReader(sSQL);

 

 

Will with

SqliteDataReader dataReader = clsDB.Get_DataReader(sSQL);