Consulting

Page 2 of 2 FirstFirst 1 2
Results 21 to 30 of 30

Thread: Store in DataBase

  1. #21
    VBAX Regular
    Joined
    Aug 2019
    Posts
    54
    Location
    For the moment i don't know ,but are there any problem with the numbers of the records?

  2. #22
    VBAX Master paulked's Avatar
    Joined
    Apr 2006
    Posts
    1,007
    Location
    Only look-up speed when you have thousands of them. I've used around 8,000 on one sheet and Excel had no problem with that.
    Semper in excretia sumus; solum profundum variat.

  3. #23
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by paulked View Post
    You probably haven't set the Active X reference in the VBE window.
    But you should never auto-instantiate objects.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  4. #24
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by ksilenio View Post
    Hi to all .Thank you all for your answers ,but i asked how can i connect from vba environment to a SQL Database , if its possible.
    It is important to know what you are connecting too so that the correct connection string is used. You said that you were using Solidworks, but you seem to be confusing that and SQL Server.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #25
    VBAX Master paulked's Avatar
    Joined
    Apr 2006
    Posts
    1,007
    Location
    Hi xld

    But you should never auto-instantiate objects.
    I appreciate that when you instantiate an object it takes up memory, but didn't realise that selecting a reference had any impact on memory until the object was used.
    Semper in excretia sumus; solum profundum variat.

  6. #26
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Quote Originally Posted by ksilenio View Post
    I used to programming in DELPHI with SQL DataBase so my experience to a DB is good enough(for the DELPHI). Now i am furniture designer and i use the SolidWorks for that . I am creating some macros in VBA language (i am new in VBA language) so i have some blanks in VBA , how to connenct with the SQL server , how to manipulate the data etc
    You must learn the coding starting from the SolidWorks data base you use.
    What is the SQL language (Code) the SolidWorks DB engine understands? Oracle SQL: MariaDB SQl, PostGreSQL SQL, FileMaker SQL, Or even Solidworks SQL

    Then learn the Language (code) the DB connection Device/System uses. ADO.NET, ADO, JET, DAO, Or even SolidADO.

    VBA can transmit any language (SQL code words) needed to and thru any Connection device:



    When paulked and XLD are talking about "References" they are talking about Early Binding vs Late Binding. Early binding is slightly simpler and works well for the Standard (always present: Application, Office, and VBA) References, but Late Binding is much more robust and universal.

    Google "VBA Early Late Binding" for more information.
    Last edited by SamT; 12-31-2019 at 10:58 AM.
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  7. #27
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by paulked View Post
    I appreciate that when you instantiate an object it takes up memory, but didn't realise that selecting a reference had any impact on memory until the object was used.
    Does your response have any relevance to what I said? My comment was about auto-instantiating, not instantiating. It is a bad practice that can have unexpected results.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  8. #28
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by SamT View Post
    You must learn the coding starting from the SolidWorks data base you use.
    What is the SQL language (Code) the SolidWorks DB engine understands? Oracle SQL: MariaDB SQl, PostGreSQL SQL, FileMaker SQL, Or even Solidworks SQL
    If he really is/wants to use Solidworks, I think he has a problem. Solidworks seems to be locked down, you cannot query it directly. They do provide an API that you can program, but that means learning a whole new box of tricks (not for me).

    And to be perfectly frank, the OP is asking for an application, not just some code to access a database. I envisage a big job for someone.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  9. #29
    VBAX Master paulked's Avatar
    Joined
    Apr 2006
    Posts
    1,007
    Location
    Does your response have any relevance to what I said?
    Not really, I didn't understand it fully before I read up on it

    Off to party now... Happy New Year all!
    Semper in excretia sumus; solum profundum variat.

  10. #30
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    I envisage a big job for someone.
    Yea, the OP. Not me, I don't need SolidWorks. That's why I gave him clues as to the path he must follow
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •