Results 1 to 6 of 6

Thread: [RESOLVED] VB.Net to SQL through network?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2012
    Posts
    13

    Resolved [RESOLVED] VB.Net to SQL through network?

    Here is my situation: I have created a visual basic .net (3.5) application that, upon user completion will update or insert that user's information into a SQL Server database. The query works perfectly, but upon beta testing, I realized that the majority of user workstations do not have direct access to SQL Server for security reasons. The resident programmer has informed me that I must convert my windows application to a web app to be deployed on a server that has direct access to SQL Server. I am not a programmer (I'm a Mechanical Engineering intern) and this is my first experience with even VB.Net. I am asking whether or not there is an easier way to communicate with the database than completely switching my application to a web app? What options do I have and which should take less time than converting my entire application which would also cause reduced functionality? Thanks in advance for your help.

  2. #2
    Code Monkey wild_bill's Avatar
    Join Date
    Mar 2005
    Location
    Montana
    Posts
    2,993

    Re: VB.Net to SQL through network?

    Are the workstations and SQL server on the same network? If so you can create a SQL user account, and use that authentication information in the connection string.
    That is the very essence of human beings and our very unique capability to perform complex reasoning and actually use our perception to further our understanding of things. We like to solve problems. -Kleinma

    Does your code in post #46 look like my code in #45? No, it doesn't. Therefore, wrong is how it looks. - jmcilhinney

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2012
    Posts
    13

    Re: VB.Net to SQL through network?

    Thanks for the response wild_bill. SQL is on a specific logical network which is only fully accessible from administrator workstations, the rest of the workstations do not have direct access. The web server, on the other hand, has direct access to both the standard and admin (Where SQL databases are) networks/ logical servers. Both are on the same physical servers, but this segregation cannot be changed. From what I have seen so far, it looks like my best options (aside from converting to a web app) would be to create a web service, WCF service, or convert only my last form to a web form and have my windows app call that page and pass data to run the necessary updates and serve as the last form in the overall application. Keep in mind that anything beyond visual basic .NET is new to me and my xml experience is limited.

  4. #4
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,038

    Re: VB.Net to SQL through network?

    I think that you should focus on WCF, primarily, but it depends largely on how much data needs to hit the database. The WCF service would be run on the web server, so it would have access to the database. If you can make the design as simple as asking for datasets from the database (or datatables, of course), and passing back datasets to update back to the database, then the WCF service would be pretty simple (if any WCF service is simple, but that depends on how the system is set up).
    My usual boring signature: Nothing

  5. #5

    Thread Starter
    New Member
    Join Date
    Jul 2012
    Posts
    13

    Re: VB.Net to SQL through network?

    Honestly, this application will probably only be utilized once or twice a day and it only adds or updates a single table with less than ten fields. Lending from this, bandwidth/performance shouldn't pose much of an issue so either one should work fine? Web service or WCF service I mean.

  6. #6
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,038

    Re: VB.Net to SQL through network?

    Yeah, either should work fine. You may find that the WCF service is a bit easier. Technically, setting up a WCF service is really easy, but there is so much black box about it that it can appear harder than it is. Fortunately, there is a fair amount of pretty good documentation out there regarding setting one up.
    My usual boring signature: Nothing

Posting Permissions

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



Click Here to Expand Forum to Full Width