Hello Friends,
Good day to you all
I have been using Access as a base for all my vb projects. I am told SQL is more secure and can handle a wide range of data. I have therefore decided to give it a try, but I don't have any Idea as to how to do the connection. Can anybody help me by taking me through the steps to go through to connect to SQL database.

Any suggestion will be much appreciated.

Hi,
Nothing offence but if you search with this keyword on daniweb "sql connection" you will see lot of good results. Also I would suggest you to read some SQL Books to start with.

do you know anything about sql?

do you ever worked with a database server like SQL SERVER or ORACLE?

i'm asking this because there is a lot of things first you need to know before you make any project using any server side rdbms.

Hello Shouvik,
Thanks for the quik response to my request, I really appreciate it.
I have been reading about SQL 2000 for a couple of weeks.
All I know for now is how to create and delete databases and tables as well as enter, delete and edit data.
Please let me know what else to read about to be able to connect the table to my forms.
thanks.

Hey Binoj,
Thanks so much for your advise, I will try them too.

Hello friends,
I have an excell file that I want to convert to XML, but I do not know how to go about it.
I would be very grateful if can you help me do that using VB6 codes.
Please note that I am using office 2003.
Thanks.

Hi,

You are facing the same problem which I had face before. This is very simple, let my tell you:

First, make a database using SQL and let the database name be 'MyRecord' and your ID for your Database be 'Master' and make Password as '123'. So, to be able to connect to this database using ADO, you may write this code in your VB form / module:


Set ConnectData = New ADODB.Connection
ConnectData.Provider = "SQLOLEDB.1;Password=123;Persist Security Info=True;User ID=Master;Initial Catalog=MyRecord"
ConnectData.Open

To make this code working properly, You have to select ' Microsoft ActiveX data Objects Recordset 2.0 or 2.1 or 2.5 or 2.8'from the preference.

If you do like this, the connection will surely correct.

Hello friends,
I have an excell file that I want to convert to XML, but I do not know how to go about it.
I would be very grateful if can you help me do that using VB6 codes.
Please note that I am using office 2003.
Thanks.

OH Friend, this is very simple, Whether you are using Office 97 -2008, the coding is same. Read Excel sheet from VB and display the list using Flex Grid. As there are a number
of way to display excel data (content) in VB Form, do it as you like, and then save this to XML format like thia

.Save App.Path & "\LExtracted\Name_Of File.XML", adPersistXML

[Hi,

You are facing the same problem which I had face before. This is very simple, let my tell you:

First, make a database using SQL and let the database name be 'MyRecord' and your ID for your Database be 'Master' and make Password as '123'. So, to be able to connect to this database using ADO, you may write this code in your VB form / module:


Set ConnectData = New ADODB.Connection
ConnectData.Provider = "SQLOLEDB.1;Password=123;Persist Security Info=True;User ID=Master;Initial Catalog=MyRecord"
ConnectData.Open

To make this code working properly, You have to select ' Microsoft ActiveX data Objects Recordset 2.0 or 2.1 or 2.5 or 2.8'from the preference.

If you do like this, the connection will surely correct.

This article has been dead for over six months. Start a new discussion instead.