Poser une questionPoser une question
 

TraitéeSQL DATASET

  • mercredi 4 novembre 2009 16:26MelindaMoore Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     

    I am using SQLITE for my DB. Originally I was using SQL Express 2008. We switched over to and I was able to add the SQLITE database into a dataset. I use the dataset to fill crystal reports. Now I need to make another report using a different SQLITE file. I go to add it to the dataset and I get

    <[main]..[District]>

    Could not retrieve schema information for table or view [main]..[District].

    If I select ok it does not show the columns. But when I try and edit the query Builder I see the Column names. When I try and accept changes I get

    Failed to update CommandText:  The schema of data returned by new command could not be retrieved. Schema of table "District" was not changed and might not reflect data retrieved your command. The database returned the following error:

    'Could not load file or assembly 'Microsolf.SlqServer.Types, Version=10.0.0.0, Culture=neutral,PublicKeyToken=89845dc8080cc91' or one of its dependencies. Then system connot find the file specified.'

    The only difference that I know of from when I did work to know is that I had to uninstall SQL express 2008 in order to put an older version of 2005 on my computer for another program that I needed at the time. I have check to make sure that the  system.dada.sqlite.dll is in my project. Also put it in the same location as the DB.  I have tried make another DB and using a copy of the db I already have in the dataset but they do not work.

    I cannot add anything to the crystal report without this dataset because I cannot get my database fields to fill in a SQLITE.

Réponses

Toutes les réponses

  • mercredi 4 novembre 2009 19:22Malange Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    do u have any code? post here please?

    Don't judge me, just Upgrade me. Thanks!
  • mercredi 4 novembre 2009 19:27Dig-Boy Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée
    Hi Melinda.  This appears to squarely be an issue with SQL syntax and database structure -- not a VB.NET question.  While you may get lucky that someone knows something about SQLite here, it is far more likely that you'll get a faster and more informed answer from a support forum that is more dedicated to this vendor/technology.

    If you're not aware of it already, there is some support offerred for SQLite users here:

    http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


    Good Luck!
  • lundi 9 novembre 2009 15:00MelindaMoore Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    There is no code for the problem. All I am trying to do is add a new data source using the Data Source Configureation Wizard. I was successful in doing with with the database that I made with SQLITE. Then I took of the SQL express off my computer and I cannot even make changes to the existing Dataset or add a copy OR add a new. I do create a seperate database in the VB code at "start of new job" that is:

    Jobsqliteconn = "Data Source = C:\Premiere\" & jobfilename & "\" & jobfilename & ";"

    Using SQLconnect As New SQLite.SQLiteConnection()

    Dim SQLcommand As SQLiteCommand

    SQLconnect.ConnectionString = Jobsqliteconn

    SQLconnect.Open()

    SQLcommand = SQLconnect.CreateCommand

    'SQL query to Create Table

    SQLcommand.CommandText = "CREATE TABLE Joint(Joint_id INTEGER PRIMARY KEY AUTOINCREMENT, Job_id_in_Joint INTEGER, Joint_Name varchar(50), [Joint_Number] [int], " & _
    "[Accessory] varchar(50), [Comment] varchar(50), [Date] varchar(50), [Time] varchar(50), [Final_TQ] [float], [Final_Turns] [float], [Max_RPM] [float], " & _
    "[SH_TQ] [float], [SH_TR] [float], [SH_RPM] [float], [DTQ] [float], [DTR] [float], [PI_LOADCELL] [int], [PI_UNIT] [int], [PI_Tong] [int], img [image]," & _
    "[Log_file] text, [img_file] text, [Driller_J] varchar(50), [Stabber_J] varchar(50), [Tong_op_J] varchar(50), [Tech_J] varchar(50), [Casting_J] varchar(50)," & _
    "[TeamLeader_J] varchar(50), [Customer] varchar(50), Location varchar(50), Lease varchar(50), WellNum varchar(50), RigNum varchar(50), Footage varchar(50)," & _
    "Size varchar(50), Weight varchar(50), Grade varchar(50), Connection varchar(50), District varchar(50), High_Shoulder integer, Low_Shoulder integer," & _
    "Reference_TQ float, Optimum_TQ float, Minimum_TQ float, Maximum_TQ float, Minimum_TR float, Maximum_TR float, Maximum_RPM float, Tong_Length float," & _
    "Premium varchar(50), Torque_slow INTEGER, End_RPM INTEGER, Shoulder_Det varchar(50), StartJoint INTEGER, JointNumber INTEGER);"

    SQLcommand.ExecuteNonQuery()
    SQLcommand.Dispose()
    SQLconnect.Close()

    End Using

    It creates the database just fine. Add column to it and I can access it with VB. I just can add it to a dataset. I was wondering if it is becuase I do not have 'Microsolf.SlqServer.Types.dll' anywhere on my computer. I was unable to find this file on the internet.

  • lundi 9 novembre 2009 15:15Dig-Boy Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    Yes.  That's quite possible that your un-installation blew out some critical .NET dll's of the SqlServer variety.

    A good place to start looking for things like this is the Sql Server Feature Pack. 

    Here's the SqlServer 2005 set of features:
    http://www.microsoft.com/downloads/details.aspx?familyid=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&displaylang=en

    ... and for 2008:
    http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en

    I might first look at the Sql Server Management Objects libraries.

    Good Luck!