I know the question has been asked a few times already, but I needed some clarification.
I am new to using a database with my vb app. Initially, I added the ADO Data Control 6.0 component to my project, and used that to setup the conenction to my access database. And I used the following code to do my sql queries:I did it this way because in my vb book that I am using for reference, they included this component along with the datagrid.VB Code:
'Query to get users id from the database strSql = "SELECT UserID FROM Users " & _ "WHERE Name = '" & strUserName & "'" adoOnline.RecordSource = strSql adoOnline.Refresh 'Store user id intUserID = adoOnline.Recordset("UserID")
Is it that when you don't have any data bound controls (like the datagrid, flexgrid etc), you don't need to use the ADO data control and you should do the connections to the database in the code?
I know now how to do the connection do the database without the ado data control component. I searched before posting. So no need to post that code.![]()




Reply With Quote