Search results for query: *

  • Users: gs99
  • Order by date
  1. G

    Copy Visual Basic 2010 project with SQL database to another computer

    I have no disagreement that the integral database solves the problem at hand. But I do not agree it's the only way for general practice. To start with, I and many others have started the "SQL experience" at the source - the SQL server's IDE. The generated databases are saved in ...MSSQL\DATA...
  2. G

    Copy Visual Basic 2010 project with SQL database to another computer

    I would like to conclude this thread which asked the question about copying a project with SQL between computers during development. Using Visual Studio 2010 Express, and SQL Server Express 2008 R2 or SQL Server 2012. I see two options: .1 The SQL data file resides in the Visual Studio project...
  3. G

    Copy Visual Basic 2010 project with SQL database to another computer

    Thanks for your replies. As I see it now, there are several options. I think this kind of info should be explained in a sticky post; I don't expect replies to every question here. (1) What kind of database? "SQL Server Compact 3.5 database files (.sdf), SQL Server and SQL Server Express...
  4. G

    Copy Visual Basic 2010 project with SQL database to another computer

    I come from an old school of separation between program instructions and data - the db should be developed and maintained separately from the program code. I'm not a professional in this so I may be wrong. So I developed the db in SQL Management Studio. Then I Detach it when ready for the VB...
  5. G

    Copy Visual Basic 2010 project with SQL database to another computer

    Data Source=.\SQLEXPRESS;AttachDbFilename="C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA\MyFamily.mdf";Integrated Security=True;Connect And I copied the two db files to the exact same folder in both computers: C:\Program Files\Microsoft SQL...
  6. G

    Copy Visual Basic 2010 project with SQL database to another computer

    I have a Visual Basic 2010 project with SQL database (2008 R2), detached from server. The db was not copied into the project. It resides in the SQL directory. I need to debug the app on this computer and another computer that has VB 2010 but SQL 2012. All are Express versions. When I copy the...
  7. G

    Delete obsolete settings in My.Settings

    I clicked Synchronize button. Got message: “No user.config files were found in any of the following locations: “ (No information is provided about the locations.) I found this message on social.msdn.microsoft.com/Forums and the moderator suggested “Did you add the App.config in the project...
  8. G

    Delete obsolete settings in My.Settings

    VB 2010 Express. When I display user.config, it shows old settings that I've deleted via Project, Properties, Settings. I know the file is current,since it reflects changes made recently. How can I delete the obsolete settings? The Windows (7) path is...
  9. G

    Usage of query in other procedures (public scope)

    This code works: Module Module2 Dim db As New MyFamilyDataContext Dim list5 Sub makeQuery() 'SQL table Person Dim Query5 = From p In myContext.Persons Select New Person1 With {.firstName = p.firstName, .lastName = p.lastName} list5 = Query5.ToList()...
  10. G

    Usage of query in other procedures (public scope)

    I would like to address only one point in this post, relating to the “later” question. The article explained three main parts: ' Data source. Dim numbers() As Integer = {0, 1, 2, 3, 4, 5, 6} ' Query creation. Dim evensQuery = From num In numbers Where num Mod 2 = 0...
  11. G

    Usage of query in other procedures (public scope)

    That article describes the difference between Immediate and Deferred execution (see below). It does not address named types; it does not answer the immediate question. You stated: “A new ParentData1 object is created for each match in query.” I replied: “I don’t understand where the objects...
  12. G

    Usage of query in other procedures (public scope)

    I don’t understand where the objects are stored for later access. For comparison, this is a way to instantiate objects for class Person1. Public Class person1 Property firstName As String Property lastName As String End Class Module Module2 Dim person1Col As New Collection...
  13. G

    Usage of query in other procedures (public scope)

    So then, with this code: Public Class ParentData1 Property firstName As String Property personIDChild As Integer Property personIDDad As Integer Property personIDMom As Integer Property mateID As Integer End Class Sub MakeQuery() ... Select New ParentData1 With...
  14. G

    Usage of query in other procedures (public scope)

    For Each pq In myQuery cnt += 1 Thanks for your comments.
  15. G

    Usage of query in other procedures (public scope)

    @Herman this is accepted: Private myQuery As System.Linq.IQueryable but the Count method is still not available. this causes drastic complaints - the whole module is invalid: Private myQuery As System.Linq.IQueryable(Of <String>) @JohnH I tried Selecting to New Output With ... I was hopeful...
  16. G

    Usage of query in other procedures (public scope)

    Two reasons: How do I execute myQuery if it’s not within a sub? Also, if the Dim myQuery is within a sub, it’s recognized as System.Linq.IQueryable(Of <anonymous type>); elsewhere it’s only Object. I’ve tried the following: Module Module1 Public myQuery = Nothing Sub MakeQuery() myQuery =...
  17. G

    Usage of query in other procedures (public scope)

    Using Express VB 2010 and SQL 2008. When a query is made, how can the results be made available to other procedures? For example, in Module: Sub makeQuery() dim myQuery ... End sub Sub useQuery() for each p in myQuery ... End sub
  18. G

    Question SQL identity does not work

    I would like to clarify the 'Express' question. In my initial post I said “In SSMS (2008), I inserted 2 records”. You then said “if you're using SSMS to create/view your db, then it's likely you're using SQL Express” My reply provided info about my SQL: >I have SQL Server 2008 R2. >On the...
  19. G

    Question SQL identity does not work

    Does it matter? I have SQL Server 2008 R2. On the ‘Connect to Server’ dialog, Server name is set to ‘.\SQLExpress’. About shows: Microsoft SQL Server Management Studio Version 10.50.1617.0 Does that mean I’m using SQL Express? If the SSMS I have is not Express, couldn’t I create the database...
  20. G

    Question SQL identity does not work

    This thread was moved from VB to SQL. The "identity" works fine (automatically) while in SSMS, so I didn't think it was a SQL problem. I was asking about Visual Basic operation. When user clicks the 'plus' sign to add a record, is VB supposed to insert the next identity? Most DB's are meant to...
Back
Top