473,801 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem in sql connection through adodc control in v.b 6.0

31 New Member
Dear all,
i,m new to v.b and i tried to connect to sqlserver through adodc in a datagrid or datalist , but there was no result in my form, can any one tell me what's the reason and i done every thing to connect with the sql
step 1:Right click the adodc control declared the provider,databa se,pwd
step2.: In choose Record source i declaled the commad type as "cmd table" and as well the table name
step 3 : Draged a data grid and declared the datasouce as " adodc1"

but still i couldn' t see the result
(I also tried to connect the Ms.Access but it also not coming)

plz advice me the above solution
Thanks in advance
Apr 1 '08 #1
1 2177
Tenneyson
17 New Member
Try this for your datagrid adodc problem

Step 1: Draw your adodc1 and data grid on your form

step 2: on your windows start menu, go to setting and then control panel where we are going to create a connection that you are going to be using
Follow the following root: Control Panel.....Perfo rmance and Maintenance.... Administrative Tools......Data Sources(ODBC). Then under UserDSN tab select add on right side of the box. In the Create New data source dialog box, scroll down to select SQL server. Click Finish then Give it a name, description(Can be of tha same name eg MySQLConn) and select the server where your sql database resides. Go next and change the default database to your databaseName and finish

step 3: Right click on your Adodc1 and go to adodc properties. Under General Tab choose Use ODBC data souce name and drop down the combobox to select the data source you created earlier in your windows control panel. Under the Record source tab cmdtype = 1-Adcmdtext and under cmdText=select * from [Table Name] and the apply and OK.

Step 4: datagrid properties- datasource=adod c1

run your program
Apr 11 '08 #2

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

Similar topics

0
1151
by: Meher Malakapalli | last post by:
Hi I have an application built in VB6. It uses an adodc control bound to several other controls. After installing the .NET framework, the application's data-bound controls no longer display the data from the recordset contained by the adodc control. Has anyone run into this problem? Thanks M
4
5985
by: Raoul Watson | last post by:
I have a form with an AdoDc control associated to a datagrid. The AdoDC uses a "ConnectionString" such as "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=..." this is where the problem begins. The data source will not be known until the user selects the database. What is really weird is that if the source is not placed during design time, during run time the form upon loading will generate an error ("Failed to
14
10739
by: marinho80 | last post by:
Hoping someone has experienced this before and can offer a solution. I have an app. that was designed in vb6. The app works with data from a SQL server, retrieves the data using the adodc (MSADODC.OCX) control and displaying data using the datagrid control.(MSDATGRD.OCX) Have had no problems to date with windows xp,successfully installed on more than 30 pc's all running windows xp, with the exception of 3 windows xp client machines where i...
4
1966
by: nkechifesie | last post by:
I have an adodc control that is build with several tables using the select command. I need to search for a record on the adodc, is it possibles? If yes, how?
3
2086
by: deena22 | last post by:
hello, i'm using 'Access database' and VB 6.0. My database is named ' timesheet' and it contains a table named 'tabletimesheet'. The table contain the following fields: 'staffname, stafftype, date, projectname, projectcode and hoursworked' . On my VB 6.0 form, i have got a ' list Box' containing the 'type of staff', for example 'engineer, manager or secretary'. I have got another 'list Box' containing the 'name of projects' . Also i have got...
0
962
by: shreshta | last post by:
hello, this is the code i wrote for my application to retrieve values,delete values,update values and insert values... i am havin doubt in delete and retrieve snippets whether it works right. and deletion should ask for the primarykey which is traderid over here and on getting it,it retrieves all details for the particular user and deletes it. i couldnt check out right now as i dont have connection. 'adodc control Private Sub...
4
2974
by: shreshta | last post by:
this is the code i wrote for my application to retrieve values,delete values,update values and insert values... i am havin doubt in delete and retrieve snippets whether it works right. and deletion should ask for the primarykey which is traderid over here and on getting it,it retrieves all details for the particular user and deletes it. i couldnt check out right now as i dont have connection. 'adodc control Private Sub...
2
2844
by: hussainiyad | last post by:
Hi to all i today installed tthe v.b 6.0 in my system and i found 2 main problems problem1>--.I couldn,t able to open the data Project ,we know it contains two components one is data Environment and another is.Data Report , but in my system only Data Environment displayed but the Data Report not opened , and it showed me the error msg " The file C:\Program Files\Microsoft Visual Studio\VB98\Template\Projects\DataRpt.Dsr could not be...
6
4117
by: hussainiyad | last post by:
Hi all, I,m new to vb.6.0 and i don,t know how to connect to sql server through v.b 6.0 with the help of adodc control, and anyone plz tell me how connect and insert ,update,delete and other functions, coz i tried in m.s access not in sqlserver, This is the coding which i used in ms.access 'for insert rs.Fields(0) = Text1.Text rs.Fields(1) = Text2.Text rs.AddNew
0
9558
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10527
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10300
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10057
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9106
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6834
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5492
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4267
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3786
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.