visual basic code for converting excelsheet to SQL server?
96164
I suggest you use a DTS package, making a DTS (Data Transfermation Package), a function of the SQL Server, will\ngreatly simplify the task of getting data from Excel to SQL server. they can be saved and setup to run on a schedule or just used once. Great feature :)
646747
You will need to load the XML file into a DOM. The DOMDocument object is part of the MSXML DLL and allows you interact with an XML document.\n\nOnce loaded you can use an XPath expression to determine if what you are looking for exists in your XML document.\n\nHere is the XPath syntax\nhttp://www.w3schools.com/xpath/xpath_syntax.asp\n\nAt the bottom of this page you can see an example of it.\nhttp://www.perfectxml.com/msxmlDOM.asp\n\n - Create the DOM\n - Load the document NB it must be well formed xml otherwise it will error, you may have to trap the error otherwise it continues with unexpected results\n - Try to "selectsinglenode" using your XPath expression (XPath is to XML what T-SQL is to SQL Server databases)\n - If the node exists you will have a node object you can interrogate, otherwise you have 'nothing'
406399
If you have not already done so, add the Insert Script command to the Tools menu. \n\n\nOn the Tools menu, click Customize, and then click the Commands tab. \n\nIn the Categories box, click Tools. \nDrag Insert Script from the Commands box over the Tools menu. \n\nWhen the Tools menu displays the menu commands, point to the Macro submenu.\n\nWhen the Macro submenu displays the menu commands, point to the location where you want Insert Script to appear on the menu, and then release the mouse. \n\nIn the Customize dialog box, click Close. \n\nClick in your Web page where you want to add a script. \nOn the Tools menu, point to Macro, and then click Insert Script. \n\nUse the Microsoft Script Editor (Microsoft Script Editor: Used to add text, edit HTML tags, and edit any Microsoft Visual Basic Scripting Edition (VBScript) code in a data access page. You can also view your page in the Script Editor as it would appear in a Web browser.) to write your script. \n\nReturn to the Office program. \n\nTo update your Web page with the changes, click Refresh  on the Refresh toolbar (toolbar: A bar with buttons and options that you use to carry out commands. \n\nTo display a toolbar, click Customize on the Tools menu, and then click the Toolbars tab.).
650047
What does "hit all of the control form fields and report the information back to SQL" mean? \n\nDo you mean, you want a button that will run a given stored procedure on the server, using parameters?\n\nDo you mean, you want to obtain the value of the form fields and use them to build a SQL statement that you then execute on the server?\n\nAlso, are you using SQL server, MySQL, SAP, whatever as a SQL database?\n\nUPDATE:\n\nYou still haven't told me what kind of DB server you are using, so I'll assume is SQL Server.\n\nYou don't need to create a VBA Script to do what you want. You can simply link the relevant SQL tables in your Access project file, then work with them as though they were tables in the Access DB itself.\n\nIn other words, you can build a form based on a linked table, just like you would build a form for a regular Access table; it will insert data for you into the linked table, the same way it would for a regular table.\n\nSee link below for more information.
926229
It's going to be a macro.\nFrom your Excel file, press ALT+F11 to open Visual Basic Editor\nFind "ThisWorkbook" (should be located on the left hand side) and double click on it, a new white frame should open on the rignt hand side. From there, there should be a dropdown list reading "general", change it into "workbook", and paste the code below\n\nPrivate Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)\na = Target.Column\nIf a = 1 Or a = 2 Then\n    Select Case a\n    Case 1\n        Target.Offset(0, 1).Select\n    Case 2\n        Target.Offset(1, -1).Select\n    End Select\nEnd If\nEnd Sub\n\nAs I don't know which columns you are going to use to put your data in , I have chosen A and B (or 1 and 2) if you want to change it  (say D and E or 4 and 5) modify this part of the code like so\nif a=4 or a=5 then\n\nHow does it work?\nEvery time you make changes in your worksheet, like adding data (with your scan gun),  this should call the macro, which in turn first checks if the changes occurred in column A or B and then if it's in A moves one cell to the right and if it's in B moves one cell to the left and one row down.\n\nIf it's not precisely what you want, feel free to send me an email through Y Q/R
234098
NO! Not technically.\n\nA database has to have fixed number of named columns. Spreadsheet has a open stucture.
421773
MS access will do that, \n\nlookfor help in excel for JET or OBDC
438038
i would have a look at this site\n\nhttp://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=5120&lngWId=2
1080454
Try http://www.vbcodesource.com \n\nor\n\nhttp://www.programmersheaven.com/zone1/mh49.htm
424764
It depends on the volume of data in use - Excel struggles at handling large amounts of data. One possible alternative if budget is tight is to use Microsoft Reporting Services, which comes as part of SQL Server 2005. Great reporting tool, and included in the SQL price.
406314
If you know Java, it is not hard to write code to do such task, it might be tedious though.\nIf you don't, Ms excel could handle the job too with reasonable time and effort.
1153431
There's data adapters built-in to .NET for SQL Server.  Assuming you know how to use data adapters, you can find it as "SQL Data Adapter" in the toolbox in Visual Studio under the "Data" heading.  From here you can set your SQL commands manually or have the wizard do it for you (I strongly recommend doing it manually if you know how).\n\nI'm assuming that the tables are still on an SQL Server?  If not, I imagine you could use an ODBC adapter (you could do this if the files are on the SQL Server as well, but the first method would be easier).
241948
wrox publishing has a book called Begining ASP Databases, you would want the newer .NET version now:\nhttp://search.barnesandnoble.com/BookSearch/isbnInquiry.asp?z=y&isbn=076454375X&itm=1\nI learned with that and a book on SQL server specifically:\nhttp://search.barnesandnoble.com/BookSearch/isbnInquiry.asp?z=y&isbn=1861002319&itm=6\n\nIts a lot of fun, good luck!
775038
Nope, sorry.  What you're describing is a query.  Only Access can do that.  It's a pretty simple one, and exporting back and forth between Access and Excel is pretty easy.  If you want some help in how to do it, send me a message.
1029388
http://www.vbmysql.com/
218645
Visual Basic .NET.\n\nhttp://msdn.microsoft.com/vbasic/
683627
Just use the report wizard in SQL Server Reporting Services to create a report which gets its data from SQL server, this is fairly straightforward\n.\nNext, deploy the report to your report server (requires IIS).\nYou can then use either the web service (Reporting Services SOAP API) in a winform application to display your report, or from an ASP.NET you can put your report in a page as another piece of HTML, you can also call the webservice from ASP.NET.\n\n[When you install SQL Server Reporting Services, there are various components. The 'report server' element has to sit on a box with IIS installed. It uses SQL Server to store the report files (RDL files) that you created in Visual Studio 2003 with the 'report designer' (shows under 'business intelligence' projects once installed)\n\nIf you do this in Visual Studio 2005 with SQL Server 2005 it is a whole lot easier with better functionality.