|
I am trying to get this program im writing to simply delete a datarow out of the datatable. Here is my code and it doesnt give me any errors it acts like it does it but the data is still there.
Data Tier
Public Sub deleteData(ByVal dIndex As Integer)
Dim row As myDataSet.tblMyRow = Me.tableadapter1.GetData.Row(dIndex)
row.Delete()
Me.myDataSet.AcceptChanges()
End Sub
Business Tier
Public Sub bDeleteData(ByVal bIndex As Integer)
mydataTier.deleteData(bIndex)
End Sub
GUI Tier
Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click
Dim dIndex As Integer
Dim dCount As Integer
dCount = Me.dataGrid1.SelectedRows.Count
If dCount = 1 Then
dIndex = Me.datagrid1.Rows.GetFirstRow(DataGridViewElementStates.Selected)
myBusTier.bDeleteData(dIndex)
Me.DataSet1.AcceptChanges()
Me.TableAdapter.Fill(Me.DataSet1.myTable)
ElseIf dCount <= 1 Then
MsgBox("Please Select a Row to Delete")
Exit Sub
Else
MsgBox("Please Select One Row at a Time")
Exit Sub
End If
End Sub
Thanx for the ear
Peace
|
|
|
|
|
I have composed a project using MS VC6.0. In this project, I used
CDaoDatabase to connect ACCESS database. it can be compiled without any error or warnning, but when i have it compiled with
MS vc7.0 ,a worning starts to arise:
CDaoDatabase is deprecated....
I don't known how to solve this.
|
|
|
|
|
Yaki_15 wrote: MS vc7.0 ,a worning starts to arise:
CDaoDatabase is deprecated....
I don't known how to solve this.
It is a warning that there is a replacement technology that you should consider using because CDaoDatabase will be getting removed in a future version of MFC.
You may wish to consider reading the current documentation for MFC in the area of databases, it will most likely tell you what should should be migrating towards.
|
|
|
|
|
I'm not sure about CDaoDatabase being removed in a future version of MFC, but I know that DAO is not being ported to 64-bit. That is, I believe the 32-bit runtime is still present for a 32-bit application, but there will be no 64-bit runtime. As such, CDaoDatabase will no longer work if you recompile your application for 64-bit.
Microsoft considers DAO obsolete[^].
|
|
|
|
|
Mike Dimmick wrote: DAO is not being ported to 64-bit. That is, I believe the 32-bit runtime is still present for a 32-bit application, but there will be no 64-bit runtime. As such, CDaoDatabase will no longer work if you recompile your application for 64-bit.
Ah, well. I knew something had to be going. If the underlying technology is going, then there is no need for the CDao... classes.
|
|
|
|
|
then there is no need for the CDao... classes.
then what is the update replacement for CDao in MFC? any references?
|
|
|
|
|
Sorry, it has been several years since I used MFC.
|
|
|
|
|
hi every one,
when u have an unbound combo box in the datagridview. how do u get the value selected in that combobox. I'm trying to do that and its giving me a nullref exception. I'm working in c# 2.0 windows forms
I was trying to access that with somethin like this
datagridview1["AttendanceComboBoxColumn",i].Value.ToString();
but its not working.
plz help its urgent
thanks in advance!!
Rocky
|
|
|
|
|
i have created a database in sql server7.0 and now i have generated the script from sqlserver 7.0 and i have installed sql serve 8.0
if i connect the database to vb.net i got the answer lik this not associated with trusted trusted sql server connection how do mim clear the error
|
|
|
|
|
The SQL Server does not regocnise the windows account you are using. You need to setup the appropriate windows login on the SQL Server, and then associate it to the appropriate user in the individual databases.
|
|
|
|
|
we have formatted our system and we have installed sql server 2000 version 8.0
previously we have developed using version 7.0 and i have done above still i got the error like that
|
|
|
|
|
Rmesh wrote: we have formatted our system and we have installed sql server 2000 version 8.0
previously we have developed using version 7.0 and i have done above still i got the error like that
Have you tried what I asked? What have you done to "setup the appropriate windows login on the SQL Server, and then associate it to the appropriate user in the individual databases."?
|
|
|
|
|
where i a have to setup the appropriate windows login on sql server
|
|
|
|
|
In SQL Server. I'm sure you'll find it in the SQL Management Studio - In the Security or Logins section (I don't have SQL Server 2005 on this machine so I can't tell you exactly right now)
|
|
|
|
|
i found that if i change that one also but i got the same error .if i change my database from sql version 7.0 to sql version 8.0 if it work or else we have to change the coding in vb.net side
|
|
|
|
|
Sorry - Got confused. (People don't normally talk about version 8.0 and for some reason I thought you were talking about SQL Server 2005)
To set up the logins and users go into the Enterprise Manager and open your server in the tree on the left, open the Security folder and select Logins. From here you can set up the logins.
In the individual database, find the Users area and connect the login to the database user.
|
|
|
|
|
I am working on a project using ASP.NEt 2.0 and Sql server 2005.
My project is working fine but when i make release and install it. It doesnot work infact it doesnot open the connection with the database.
Do good and have good.
|
|
|
|
|
Modest Bird wrote: My project is working fine but when i make release and install it. It doesnot work infact it doesnot open the connection with the database.
Details! We need details!
What is the connection string while the site was under development, what is it when installed? What Security permissions are different between the development machine and the installed machine? What error messages do you get when it is installed?
|
|
|
|
|
My developmemnt machine and deployment machine is same.
It gives this error "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)" when database is hit by installed application.
Do good and have good.
|
|
|
|
|
What is your connection string?
|
|
|
|
|
SQL Server 2005 installation does not enable remote connections by default (SQL 2000 and SQL 7.0 did). You must enable remote named pipes protocol on SQL server 2005 (or TCPIP connections) before it will accept connections from a remote (not on same box) client.
|
|
|
|
|
Hi gays,
I am using sql server 2005 - SSIS packages in my application. I have on dtsx package in which i am using temporary table. but it give me error. i tried to search on net. it says about "Wrok offline", "RetainSameConnection=TRUE" and "DelayValidation=TRUE " but i failed. So do anybody have idea about these? Could you tell me whole process? I am very new to sql server 2005
Thanks in Advance
|
|
|
|
|
hello
iam a programmer.
i want to convert sybase database to sql server 2000 or sql server 2005.
What i have to do.I came to know a microsoft tool is available, will that tool convert 100% of the objects like
1. Tables.
2. Indexes
3.Constraints
4. Views.
5. Stored Procedures
6. Triggers
7. Functions
8. User defined types.
can u plz tell me will the tool convert 100%
Where i have to make changes.
is there any good websites where i can found these,
answer this question
Bye
md riyasath ali
|
|
|
|
|
I think that SSIS will convert most of that for you. However, things like Stored Procedures, triggers and functions will have to be re-worked. You'd want to do that anyway so that the stored procedures can be optimised for the new platform.
|
|
|
|
|
Hi
What is SSIS i could not get u.I came to know that there is a tool of microsoft by which we can convert Sybase database to Sql server database.
The name of the tool is SSMA(Sql server migration assistant).By this we can migrate.Will this tool convert 100%.
Will Stored procedure,Triggers,Views,User defined functions,Indexex,user defined types gets converted well.
Thank u
Bye
Md Riyasath
|
|
|
|