473,406 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Connecting VB front end to Excel as a back end

Hello.,
I want to connect my VB front end application to Excel as a back end,
to save, edit, update, delete etc..
Can anybody help me... Pls...........

Thanking You,
Manju
Nov 21 '08 #1
2 9426
QVeen72
1,445 Expert 1GB
Hi,

Add ADO Reference to your Project,
and use this connection string :

Expand|Select|Wrap|Line Numbers
  1. Dim Con as New ADODB.Connection
  2. Dim RST As New ADODB.Recordset
  3. Dim sSQL As String
  4. With Con
  5.     .Provider = "Microsoft.Jet.OLEDB.4.0"
  6.     .ConnectionString = "Data Source=C:\MyExcelWB.xls;" & _
  7.         "Extended Properties=Excel 8.0;"
  8.     .Open
  9. End With
  10. sSQL = "SELECT * FROM [Sheet1$]"
  11. RST.Open sSQL,Con,1,3
  12.  
  13.  
Each Worksheet Acts as a Table,
Usually, First Row of the Sheet Is Field Names..
If, not, then Connection string need to be changed to :

Expand|Select|Wrap|Line Numbers
  1. "Extended Properties=" " Excel 8.0; HDR=No;" " "
  2.  

REgards
Veena
Nov 21 '08 #2
Hi,
Thanks a lot.
I get it.
I've created VB application which uses VISDATA as a backend.
Here I used SQL statements for all Queries.
This works well in WIndows XP.
But when I try to install it in UBUNTU.,its showing an error
'Run Time Error 429: ActiveX can't create object.
Would you please help me step by step regarding this.,
Hope I will get solution from you.
Dec 4 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: eaocomp | last post by:
I'm trying to load data from Excel to SQL server using VB 6.0. I think I have most of the code but I ned to know how to register Microsoft Excel Object Library in VB as well as the file name and...
5
by: Lumpierbritches | last post by:
Thank you for your assistance in advance. I'm trying to figure out why on my computer the front and back ends are ok, when I use Access developer and set up the program with the front and back ends...
24
by: Bob Alston | last post by:
Most of my Access database implementations have been fairly small in terms of data volume and number of concurrent users. So far I haven't had performance issues to worry about. <knock on wood> ...
1
by: Julia | last post by:
Hello there. I have a question somewhat related to this topic, and I don't know where else to go. I hope somebody can help. I've created a database in access, that I'd like to share with less...
2
by: John Sutor | last post by:
Can anyone send me a code snippet on how to connect to an Excel spreadsheet and then read it in a row at a time? John S *** Sent via Developersdex http://www.developersdex.com *** Don't just...
4
by: Stephen Poley | last post by:
Whenever anyone has a question about securing an Access database he/she is usually referred (unsurprisingly) to the Security FAQ. This is however incomplete/unclear with respect to databases with a...
2
by: Bart | last post by:
Hi, i'm trying to connect to an excel database ('mytable'). With this code, i get the error: "Keyword not supported: 'provider'". When i remove 'Provider =' from the connection string, i get...
1
by: swethak | last post by:
Hi, How to do the bring front and bring back an images using javascript.
4
by: Stijnele | last post by:
Hello, I've got a Split database, where there a lot of back-end databases. There is one Backend-database for each customer. And there is also only one back-end linked at a time. Now I want to...
2
by: hrprabhu | last post by:
Hi, How do I automatically connecting front end and back end of a database? I have to go to tools-> Linked Table manager -> and link tables when ever I move the back end and the front end for what...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.