| | |
VB6 - SQL connection
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Mar 2008
Posts: 3
Reputation:
Solved Threads: 0
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.
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.
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.
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.
Shouvik_The_Expert_Coder
Have a problem? Don't worry just give me a call and I'll fix it for you.
Have a problem? Don't worry just give me a call and I'll fix it for you.
•
•
Join Date: Mar 2008
Posts: 3
Reputation:
Solved Threads: 0
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.
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.
well apart from the sql server tutorials you also need to know about the ADO technology. This is useful in order to connect your vb6 application to your sql server database and manipulating various back-end operations. there are a lot of resources about ADO are available on the net. But for your convenience THIS IS A VERY USEFUL LINK YOU CAN VISIT TO KNOW ABOUT ADO PROGRAMMING.
check this and get back here when you have more questions.
regards
Shouvik
check this and get back here when you have more questions.
regards
Shouvik
Shouvik_The_Expert_Coder
Have a problem? Don't worry just give me a call and I'll fix it for you.
Have a problem? Don't worry just give me a call and I'll fix it for you.
•
•
Join Date: Jul 2008
Posts: 44
Reputation:
Solved Threads: 3
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.
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.
•
•
Join Date: Jul 2008
Posts: 44
Reputation:
Solved Threads: 3
•
•
•
•
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.
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
•
•
Join Date: Jul 2008
Posts: 44
Reputation:
Solved Threads: 3
[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.
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.
![]() |
Similar Threads
- let me know d steps to connect to oracle(sql) from vb6 (Visual Basic 4 / 5 / 6)
- Connect VB6 with SQL Server 2k by DSN and DBQ, logging screen, dbase loc, uid and pwd (Visual Basic 4 / 5 / 6)
- DataReport in vb6 (Visual Basic 4 / 5 / 6)
- Attach the desired database - SQL Server - Setup Factory 7 (MS SQL)
- Update SQL database automatically using VB6 (Visual Basic 4 / 5 / 6)
- direct remote sql connection (Visual Basic 4 / 5 / 6)
- query run successfully in sql*plus but return 0 records affected in vb6 (Visual Basic 4 / 5 / 6)
- USING CLASSES in VB6 (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Want help in making multilingual application
- Next Thread: how get all users account even not login at ever
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





