Click here to Skip to main content
15,919,774 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Add unsubscribe link to header of the mail sent from outlook Pin
Richard Deeming12-May-16 2:02
mveRichard Deeming12-May-16 2:02 
GeneralRe: Add unsubscribe link to header of the mail sent from outlook Pin
srikrishnathanthri12-May-16 2:38
srikrishnathanthri12-May-16 2:38 
GeneralRe: Add unsubscribe link to header of the mail sent from outlook Pin
Richard Deeming12-May-16 3:12
mveRichard Deeming12-May-16 3:12 
GeneralRe: Add unsubscribe link to header of the mail sent from outlook Pin
srikrishnathanthri12-May-16 3:23
srikrishnathanthri12-May-16 3:23 
QuestionSaving data with data-bound Form Controls Pin
Raabi Anony11-May-16 16:31
Raabi Anony11-May-16 16:31 
AnswerRe: Saving data with data-bound Form Controls Pin
Dave Kreskowiak12-May-16 1:15
mveDave Kreskowiak12-May-16 1:15 
GeneralRe: Saving data with data-bound Form Controls Pin
Raabi Anony12-May-16 16:48
Raabi Anony12-May-16 16:48 
QuestionThe ADO.NET provider with invariant name 'System.Data.SqlLite.EF6' is either not registered in the machine or application config file, Pin
jkirkerx10-May-16 14:16
professionaljkirkerx10-May-16 14:16 
I hate to ask this question, but this is my first time using SQLite from the nuGet package.
System.Data.SQLite (x86/x64) and it installed EF6, SQLite Core, SQLite EF6, SQLite LINQ

I wrote a DLL for the DAL, and a DLL for the SQL Linq Call. Then I wrote a function to just get a count from the table to trigger creating the database. I tested it using SQL Server and it worked fine. Created the database and tables, then seeded the tables.

So then I switch over to SQLite. Adjusted the App.Config file - see below
This App.Config is from the main program project. I have App.Configs in the DLL's as well, not sure If I need them or not.
<configuration>
  <configSections>
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
  </configSections>
  <connectionStrings>
    <add name="DefaultConnection" connectionString="Data Source=WSACORE2-VM1\SQLServer; Initial Catalog=AccountMateExtras2016; User ID=mvc.connector; Password=9Moret9z" providerName="System.Data.SqlClient" />
    <add name="SQLiteConnection" connectionString="data source=d:\Amp\SIS\AMExtras.sqlite" providerName="System.Data.SqlLite.EF6"/>
  </connectionStrings>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
  </startup>
  <system.data>
    <DbProviderFactories>
      <remove invariant="System.Data.SQLite" />
      <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
      <remove invariant="System.Data.SQLite.EF6" />
      <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
    </DbProviderFactories>
  </system.data>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
    <providers>
      <!--<provider invariantName="System.Data.SQLite" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6, Version=1.0.101.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" />-->
      <!--<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />-->
      <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
    </providers>
  </entityFramework>  
</configuration>

Then I ran this in the EF DLL and got that error in the subject line.
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Data.SQLite
Imports System.Data.SQLite.EF6
Imports System.Data.SQLite.Linq

Imports AccountMate_DAL.DAL
Imports AccountMate_DAL.Models
Imports AccountMate_EF6

Public Class ef_seed

    Public Shared Function Create_Database() As Integer

        Dim pValue As Integer = 0
        Using context As New ameContext()

            pValue = context.SMTP_SEND.Count()

        End Using

        Return pValue

    End Function

End Class

I have no clue on this, and I did search for 2 hours on the subject. Any help appreciated!
Maybe the Linq I use above is not valid with SQLite.
Answer[100% Solved], How to get SQLite to work with vb.net and EF6 using the NuGet Package System.Data.SQLite (x86/x64) Pin
jkirkerx11-May-16 9:54
professionaljkirkerx11-May-16 9:54 
QuestionHow we can get last 12 months using current month using sql Pin
MANISHA SONAWANE9-May-16 20:39
MANISHA SONAWANE9-May-16 20:39 
AnswerRe: How we can get last 12 months using current month using sql Pin
Mycroft Holmes9-May-16 21:37
professionalMycroft Holmes9-May-16 21:37 
GeneralRe: How we can get last 12 months using current month using sql Pin
MANISHA SONAWANE10-May-16 0:02
MANISHA SONAWANE10-May-16 0:02 
GeneralRe: How we can get last 12 months using current month using sql Pin
Mycroft Holmes10-May-16 0:12
professionalMycroft Holmes10-May-16 0:12 
AnswerRe: How we can get last 12 months using current month using sql Pin
CHill6010-May-16 22:22
mveCHill6010-May-16 22:22 
SuggestionRe: How we can get last 12 months using current month using sql Pin
Richard Deeming11-May-16 1:23
mveRichard Deeming11-May-16 1:23 
GeneralRe: How we can get last 12 months using current month using sql Pin
CHill6011-May-16 2:08
mveCHill6011-May-16 2:08 
GeneralRe: How we can get last 12 months using current month using sql Pin
Mycroft Holmes11-May-16 2:51
professionalMycroft Holmes11-May-16 2:51 
GeneralWe want only required Month and Year instead of complete date in where condition using sql Pin
MANISHA SONAWANE16-May-16 0:05
MANISHA SONAWANE16-May-16 0:05 
QuestionDisplay status of SQL query in VBA Pin
Member 124051985-May-16 4:57
Member 124051985-May-16 4:57 
AnswerRe: Display status of SQL query in VBA Pin
Dave Kreskowiak5-May-16 12:25
mveDave Kreskowiak5-May-16 12:25 
AnswerRe: Display status of SQL query in VBA Pin
Mycroft Holmes8-May-16 14:21
professionalMycroft Holmes8-May-16 14:21 
GeneralRe: Display status of SQL query in VBA Pin
Member 124051989-May-16 4:39
Member 124051989-May-16 4:39 
GeneralRe: Display status of SQL query in VBA Pin
Dave Kreskowiak9-May-16 4:50
mveDave Kreskowiak9-May-16 4:50 
AnswerRe: Display status of SQL query in VBA Pin
Sascha Lefèvre9-May-16 5:28
professionalSascha Lefèvre9-May-16 5:28 
AnswerRe: Display status of SQL query in VBA Pin
Patrice T9-May-16 5:42
mvePatrice T9-May-16 5:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.