Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. help me

help me

Scheduled Pinned Locked Moved Visual Basic
helpcsharpdatabasesqlitevisual-studio
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ago2486
    wrote on last edited by
    #1

    :doh: :doh:

    How to do an exe on visual studio attach to sqlite. I have tried it and voicke code error: Unable to open the database file

    :zzz: :zzz:

    It makes me self that I search on the net may not have concrete answer that helps me. I was advised sqlite to embed the database but how to do it ?? I need your help

    A 1 Reply Last reply
    0
    • A ago2486

      :doh: :doh:

      How to do an exe on visual studio attach to sqlite. I have tried it and voicke code error: Unable to open the database file

      :zzz: :zzz:

      It makes me self that I search on the net may not have concrete answer that helps me. I was advised sqlite to embed the database but how to do it ?? I need your help

      A Offline
      A Offline
      Afzaal Ahmad Zeeshan
      wrote on last edited by
      #2

      Member 13322378 wrote:

      Unable to open the database file

      Perhaps that file does not exist. This is the first thing to note, if the file does not exist how can you even read it? :-) Also, you did not mention which language you are using? You are in the Visual Basic forum and only mentioning Visual Studio here. I will assume you want to use the C# library (or VB.NET, they are both same). [c# - SQLIte unable to open database - Stack Overflow](https://stackoverflow.com/questions/13459742/sqlite-unable-to-open-database) Secondly, it might be that the server or program requires some additional permissions so that the library can properly connect to the database. There is a long conversation and they all boil down to the permissions (read and write, both) of your database + directory where that file is, so that SQLite can easily update the data in the database. [Fixing Sqlite error "unable to open database file"](http://www.pantz.org/software/sqlite/unabletoopendbsqliteerror.html) For simplest of the tasks, you should try using this Firefox addon for SQLite manager, and see if it can access and open the database for you: [SQLite Manager :: Add-ons for Firefox](https://addons.mozilla.org/en-us/firefox/addon/sqlite-manager/)... It will help you understand whether there is a problem or not.

      The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~

      A 1 Reply Last reply
      0
      • A Afzaal Ahmad Zeeshan

        Member 13322378 wrote:

        Unable to open the database file

        Perhaps that file does not exist. This is the first thing to note, if the file does not exist how can you even read it? :-) Also, you did not mention which language you are using? You are in the Visual Basic forum and only mentioning Visual Studio here. I will assume you want to use the C# library (or VB.NET, they are both same). [c# - SQLIte unable to open database - Stack Overflow](https://stackoverflow.com/questions/13459742/sqlite-unable-to-open-database) Secondly, it might be that the server or program requires some additional permissions so that the library can properly connect to the database. There is a long conversation and they all boil down to the permissions (read and write, both) of your database + directory where that file is, so that SQLite can easily update the data in the database. [Fixing Sqlite error "unable to open database file"](http://www.pantz.org/software/sqlite/unabletoopendbsqliteerror.html) For simplest of the tasks, you should try using this Firefox addon for SQLite manager, and see if it can access and open the database for you: [SQLite Manager :: Add-ons for Firefox](https://addons.mozilla.org/en-us/firefox/addon/sqlite-manager/)... It will help you understand whether there is a problem or not.

        The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~

        A Offline
        A Offline
        ago2486
        wrote on last edited by
        #3

        Thanks mr. All my apologies I program under visual studio in csharp. And I installed sqlite server 3.9.1. I would like to know if I need to uninstall and use firefox ?? And how do I go about doing the exe and install it on another computer

        L 2 Replies Last reply
        0
        • A ago2486

          Thanks mr. All my apologies I program under visual studio in csharp. And I installed sqlite server 3.9.1. I would like to know if I need to uninstall and use firefox ?? And how do I go about doing the exe and install it on another computer

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Member 13322378 wrote:

          I program under visual studio in csharp.

          So why post in the Visual Basic forum? But, be that as it may, you can take a look at System.Data.SQLite[^]

          1 Reply Last reply
          0
          • A ago2486

            Thanks mr. All my apologies I program under visual studio in csharp. And I installed sqlite server 3.9.1. I would like to know if I need to uninstall and use firefox ?? And how do I go about doing the exe and install it on another computer

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            Since the repost in the VS-category is newer than this thread, I'm assuming you're still struggeling with the concept. SQLite is not a server-database, it is meant as a lightweight database-solution for local usage of your application. That gives SQLite some advantages and some disadvantages over a server-product. Richard linked you the System.Data.SQLite page; that wiki explains how to use and deploy SQLite. You'll probably end up xcopying two files along with your executable. Some other points; if you have been "searching for five months" than you have wasted time that you could have used to read the documentation. Next, "help me" is not a decent subject-line. Everyone who posts here is looking for help - and your question is rather specific to SQLite and C#. So, post your code, and let us see how you connect to your datafile. Once we have code, we can talk about possible locations where things can go wrong and what it is exactly that you need to verify.

            Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

            A 1 Reply Last reply
            0
            • L Lost User

              Since the repost in the VS-category is newer than this thread, I'm assuming you're still struggeling with the concept. SQLite is not a server-database, it is meant as a lightweight database-solution for local usage of your application. That gives SQLite some advantages and some disadvantages over a server-product. Richard linked you the System.Data.SQLite page; that wiki explains how to use and deploy SQLite. You'll probably end up xcopying two files along with your executable. Some other points; if you have been "searching for five months" than you have wasted time that you could have used to read the documentation. Next, "help me" is not a decent subject-line. Everyone who posts here is looking for help - and your question is rather specific to SQLite and C#. So, post your code, and let us see how you connect to your datafile. Once we have code, we can talk about possible locations where things can go wrong and what it is exactly that you need to verify.

              Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

              A Offline
              A Offline
              ago2486
              wrote on last edited by
              #6

              Hi

              Sorry for the topic

              "help me"

              I used the dataset

              Here is my code

              using System;

              using System.Collections.Generic;
              using System.ComponentModel;
              using System.Data;
              using System.Drawing;
              using System.Linq;
              using System.Text;
              using System.Windows.Forms;
              using System.Data.SQLite;
              namespace ACode
              {
              public partial class Form1 : Form
              {
              public static string randomstring(int length)
              {
              const string chars = "ABCDEFGHIJKLMNOPQRSTUVWYZ0123456789";
              Random random = new Random();
              return new string(Enumerable.Repeat(chars, length).Select(s => s[random.Next(s.Length)]).ToArray());
              }
              public Form1()
              {
              InitializeComponent();
              }

                  private void infoCodeBindingNavigatorSaveItem\_Click(object sender, EventArgs e)
                  {
                      this.Validate();
                      this.infoCodeBindingSource.EndEdit();
                      this.tableAdapterManager.UpdateAll(this.dBCodeAleatoireDataSet);
              
                  }
              
                  private void Form1\_Load(object sender, EventArgs e)
                  {
                      // TODO : cette ligne de code charge les données dans la table 'dBCodeAleatoireDataSet.InfoCode'. Vous pouvez la déplacer ou la supprimer selon vos besoins.
                      this.infoCodeTableAdapter.Fill(this.dBCodeAleatoireDataSet.InfoCode);
              
                  }
              
                  private void btn100\_Click(object sender, EventArgs e)
                  {
                      labelAffichage.Text = randomstring(4);
                      codeTextBox.Text = labelAffichage.Text;
                      prixCodeTextBox.Text = "100";
                  }
              
                  private void btn250\_Click(object sender, EventArgs e)
                  {
                      labelAffichage.Text = randomstring(5);
                      codeTextBox.Text = labelAffichage.Text;
                      prixCodeTextBox.Text = "250";
                  }
              
                  private void btn500\_Click(object sender, EventArgs e)
                  {
                      labelAffichage.Text = randomstring(6);
                      codeTextBox.Text = labelAffichage.Text;
                      prixCodeTextBox.Text = "500";
                  }
              } 
              

              }

              L 1 Reply Last reply
              0
              • A ago2486

                Hi

                Sorry for the topic

                "help me"

                I used the dataset

                Here is my code

                using System;

                using System.Collections.Generic;
                using System.ComponentModel;
                using System.Data;
                using System.Drawing;
                using System.Linq;
                using System.Text;
                using System.Windows.Forms;
                using System.Data.SQLite;
                namespace ACode
                {
                public partial class Form1 : Form
                {
                public static string randomstring(int length)
                {
                const string chars = "ABCDEFGHIJKLMNOPQRSTUVWYZ0123456789";
                Random random = new Random();
                return new string(Enumerable.Repeat(chars, length).Select(s => s[random.Next(s.Length)]).ToArray());
                }
                public Form1()
                {
                InitializeComponent();
                }

                    private void infoCodeBindingNavigatorSaveItem\_Click(object sender, EventArgs e)
                    {
                        this.Validate();
                        this.infoCodeBindingSource.EndEdit();
                        this.tableAdapterManager.UpdateAll(this.dBCodeAleatoireDataSet);
                
                    }
                
                    private void Form1\_Load(object sender, EventArgs e)
                    {
                        // TODO : cette ligne de code charge les données dans la table 'dBCodeAleatoireDataSet.InfoCode'. Vous pouvez la déplacer ou la supprimer selon vos besoins.
                        this.infoCodeTableAdapter.Fill(this.dBCodeAleatoireDataSet.InfoCode);
                
                    }
                
                    private void btn100\_Click(object sender, EventArgs e)
                    {
                        labelAffichage.Text = randomstring(4);
                        codeTextBox.Text = labelAffichage.Text;
                        prixCodeTextBox.Text = "100";
                    }
                
                    private void btn250\_Click(object sender, EventArgs e)
                    {
                        labelAffichage.Text = randomstring(5);
                        codeTextBox.Text = labelAffichage.Text;
                        prixCodeTextBox.Text = "250";
                    }
                
                    private void btn500\_Click(object sender, EventArgs e)
                    {
                        labelAffichage.Text = randomstring(6);
                        codeTextBox.Text = labelAffichage.Text;
                        prixCodeTextBox.Text = "500";
                    }
                } 
                

                }

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                Where is the connectionstring? I do not see anything that references your database-file.

                Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups