Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7601615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:12:28+00:00 2026-05-30T23:12:28+00:00

Well, I stepped in it now. I’m converting a program from Access vba to

  • 0

Well, I stepped in it now. I’m converting a program from Access vba to C# so I can run it independently (that’s another story…) The program reads an Excel file and then validates each row and column to be sure the data is valid (numeric, etc) and then looks up various data fields to create a transaction table on SQL Server. The transaction table is never re-validated, so it must be correct on the first try.

I’m used to procedural languages (though I have a passable knowledge of T-SQL), but now (VS2010) it appears I need to use either “LINQ to SQL” or “Entity Data Model” to get the data out of SQL Server (2005). Historically, I’ve used DAO or ADO recordsets. I need to retrieve multiple columns at a time, though by and large, I won’t be updating the tables. I can make the updates using SQL Server stored procedures (and presumably ADO?)

Although I’ve begun work using Windows Forms, I’m likely to shift it over to a console app before I finish.

What do you guys recommend? My book (C# 4.0 Griffiths, Adams and Liberty) has been talking about Entity Data Model mostly. But since I’m using SQL Server (2005) exclusively, isn’t “Linq to SQL” more appropriate? Any references to help me get started? Here’s an example “method” (in vba…) that I’m using now that’s pretty standalone that I’m using for my first attempt:

Function ValidateOverride(LaborRateID As Variant) As Long
If IsNull(LaborRateID) = True Or IsNumeric(LaborRateID) = False Then
    ValidateOverride = 0
    Exit Function
End If

Dim rstOverrideLaborRates As DAO.Recordset2
Set rstOverrideLaborRates = CurrentDb.OpenRecordset("SELECT * FROM tblStaffAugLaborRates WHERE ID=" & LaborRateID, dbOpenDynaset, dbSeeChanges + dbFailOnError)
If rstOverrideLaborRates.EOF Then
    HandleMessages "Row Rejected -- Invalid Override Labor Rate"
    ValidateOverride = 0
Else
    ValidateOverride = LaborRateID
    If (dtCurrentWorkDate < rstOverrideLaborRates!EffectiveDate) Or (dtCurrentWorkDate > rstOverrideLaborRates!ExpirationDate) Then
        HandleMessages "Row Rejected -- Override Labor Rate is not within its valid dates"
        ValidateOverride = 0
    End If
    If rstOverrideLaborRates!VendorID <> lngCurrentVendorID Then
        HandleMessages "Row Rejected -- Override Labor Rate is not  valid for this vendor"
        ValidateOverride = 0
    End If
End If
rstOverrideLaborRates.Close
Set rstOverrideLaborRates = Nothing

End Function
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T23:12:30+00:00Added an answer on May 30, 2026 at 11:12 pm

    Are u sure u want to rewrite your program? What else does it beside parsing the excel? I would recommend u into using SSIS, i’ve writen some import/export routines and a conversion using SSIS, it’s extreme fast and they are improving it even more. It’s really really good!

    I don’t think u need, but if u have the need for a GUI u can use start up SSIS package and be notified what’s happening in the process.

    PS: Logging is implemented out of the box

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can very well understand from this Selectutorial what element/tag based descendant selectors are,
An application that has been working well for months has stopped picking up the
Well, it seems simple enough, but I can't find a way to add a
Well this is incredibly frustrating. After being nagged by Rails that I need to
Well, I realise that in fact it's more likely to be my logic that's
Everyone, I am a newbie to android development. Now I have a question that
I've got a .NET 3.5 Application that was working well. The installation was also
I am attempting to create a simple app that can send a text message
Im trying to make an iOS App with Xcode, until now everything worked well.
Well the subject is the question basically. Are there any version control systems out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.