Click here to Skip to main content
15,311,280 members

Comments by Member 10376725 (Top 31 by date)

Member 10376725 5-Mar-21 11:30am View
   
shanda watkins, I am not sure what you are saying, how do I make sure my account has permission in SQL? I have worked with a few SQL databases and have never come across that.
Member 10376725 5-Mar-21 8:37am View
   
Did not make a difference, still get same error message.
Member 10376725 8-Feb-21 8:20am View
   
thanks OriginalGriff, that will get me started. And thank you for taking the time to give me a real solution, instead of a smartarse comment.
Member 10376725 8-Feb-21 7:47am View
   
That's a rather silly question from a "developer". There are a lot of things I wasn't sure that I could do in the past, I am a visionary and succeeded in accomplishing them all.
Member 10376725 11-Jul-19 16:39pm View
   
After looking at the right information I am running SQL Server version 14
Member 10376725 11-Jul-19 10:11am View
   
Sorry, correct I'm running SQL Version 15. I've changed it. Thanks for the heads up.
Member 10376725 17-May-19 15:41pm View
   
Dave, this program has been evolving for about 6 years and I've never had to use that before. Doesn't mean I shouldn't have, I just haven'y. I'm not sure where to put it, I tried it in the subroutine, and then in the declarations and neither changed anything. This re-install has caused a number of problems, the first being I couldn't publish a program and every time I tried it wanted to install .NET Framework 4.7.2. Finally got it to publish but still wants to install the Framework. But this has really got me flustered.
Member 10376725 4-May-19 17:47pm View
   
As I stated in my original inquiry these files do not show up in the Solution Explorer so can not be removed that way. They are in a sub directory called 'My Project' (not to be confused with the 'My Projects' under the Solution Explorer). I used 'Add' to add a new class, and when it was completed, doesn't show up in the Solution Explorer but is in the 'My Project' sub directory.
Member 10376725 4-May-19 12:08pm View
   
No, I think I'll just rebuild it. That will allow me to clean up some other things and will probably be the safest course of action. Thanks Richard.
Member 10376725 4-May-19 11:39am View
   
That thought had entered my mind, but was hoping I'd find an easier way. You're probably right though. May have to bite the bullet.
Member 10376725 11-Feb-19 10:26am View
   
SpeakAsync solved one problem I was having, where the program halted until the speak command finished, but didn't help the delay problem.
Member 10376725 10-Sep-18 11:54am View
   
AGAIN THANK YOU/ WORKS AS IT SHOULD.
Member 10376725 9-Sep-18 10:41am View
   
Dave;
First, at this time I have no intentions of deploying this to other machines other than my own. It's designed for my movie collection. But, I would like to be able to run it from my task bar without having to load VS and running it there.

So now, that being said, where do I put the .dll files, in the same directory as the .exe or where? Right now they're in the Projects file.

I really appreciate your help on this.

darby
Member 10376725 7-Sep-18 15:58pm View
   
I have since changed to Windows Media Player, Removed all references to VLC, pulled Windows Media Player into the ToolBox, and onto my form, from the COM dialog box and Imported both WMPLib and AxWMPLib to the program. (The editor declared I did not need to import either of these Libraries)compiled and ran it and everything ran as expected. As soon as I published it I got the same error except it said 'AxInterop.WMPLib' I guess I just ASS-U-MEd that being a Microsoft plugin it would include all the necessary files. (silly me), Sooo, how do I assure these libraries get included in the published version?

darby
Member 10376725 28-Aug-18 12:07pm View
   
All I know is I have this database with over 800 movies in it, and I want to create a UI that will allow me to be able to View, Add, Delete, and any other manipulations I want to do to it and I cant even access the data. I already have a similar program with a similar database and no problems. Why can't I make it happen in the new program? And what do I have to do to make it happen?

as I stated earlier, it doesn't make sense that I can create a database then not be able to access it with a VSVB program. Or C# or C++ for that matter. I just prefer Visual Basic.

darby
Member 10376725 27-Aug-18 20:49pm View
   
Hey OriginalGriff, what happens if I end the MSSQL$SQLEXPRESS task?
Member 10376725 27-Aug-18 18:19pm View
   
I have a Visuak Basic program that I am working on. I have the main progam on my Desktop but am working on an upgrade for it. I'm doing this on my laptop for the reason of portability along with the fact I didn't want to take a chance of corrupting the original data. I created a duplicate database on the laptop and, using a .txt file, i ported the data from the main database to the new one. All worked well, but now I want to attach the new database to the VB program and ran into the above problems. I changed the permissions, but now it says the file is open in another operation. So now what??? I understand the whys, but not letting me access a database I created seems a bit counter productive to me.
Member 10376725 27-Aug-18 13:22pm View
   
Who is the agent if not me, I'm the only one that uses this computer and installed everything myself.
Member 10376725 27-Aug-18 13:21pm View
   
That needs some explaining. Anyway, it did bring up another problem, when I tried to attach the database to a VB project it said I don't have permission to use the file. So, I changed the permissions to allow everyone access and now it tells me the file is open in another program. For the life of me I have no idea what it is talking about.
Member 10376725 27-Aug-18 11:52am View
   
Thank you, I found it. I wonder why Explorer didn't find it.
Member 10376725 27-Mar-18 16:03pm View
   
I have another question if I may. I have built a DataGridView and when I click on a specific cell it opens another window and supposed to display the column name and the data in the cell. The window opens, but in order to get the data to show I have to press enter. I have been working on this for a while also but can’t figure out why the information won’t show when the window opens. Here is the code After the cell.click. Any suggestions?

Private Sub GrdViewMovies_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles grdViewMovies.CellContentClick
Dim value As Object = grdViewMovies.Rows(e.RowIndex).Cells(e.ColumnIndex).Value
Dim colNumb As String = grdViewMovies.CurrentCell.ColumnIndex.ToString

' Make sure only information in columns 0, 1, 2 or 4 can be displayed.

If colNumb = "0" Or colNumb = "1" Or colNumb = "2" Or colNumb = "4" Then
displayText = CType(value, String)
colName = grdViewMovies.Columns(e.ColumnIndex).Name
Using sayitForm As New Information
sayitForm.ShowDialog(Me)
End Using
End If
End Sub

Public Class INFORMATION

Private Sub TxtSayIt_TextChanged(Sender As Object, e As EventArgs) Handles txtSayIt.TextChanged
txtColumnBox.Text = SQLForm.colName
txtSayIt.Text = SQLForm.displayText
End Sub
End Class
Member 10376725 27-Mar-18 15:44pm View
   
Thanks ppolymorphe, worked as desired.
Member 10376725 10-Feb-18 15:16pm View
   
The db was created in SQL, I created it on this computer and am trying to attach it to a Windows Form so I can manipulate it with a Visual Basic program. I have gotten past the server problem but now have a new problem. Now when I try to attache it I am getting this error message.

Unable to open physical file "C:\Program Files\Microsoft SQL Server\MSSSQL12.Elyea_SQLEXPRESS\MSSQL\DATA\Temp_Emp_Log.ldf Operating System error 5: "5(Access Denied)"
An attempt to attach an auto-named database for file C:\Program Files\Microsoft SQL Server \MSSQL12.ELYEA_SQLEXPRESS\MSSQL\DATA\Temp_Emp.mdf Failed. A database with the same name exists, or specified file cannot be opened or it is located on UNC Share (?)

I have created and attached data files on this system previously, but the last update of Windows 10 Pro has created numerous problems with my systems. I managed to work through them all but now this rears it's ugly head and I'm not sure if it is a Windows 10 problem or a Mocrosoft SQL 2014 problem or a Visual Studio 2017 problem.
Member 10376725 13-Jun-16 18:29pm View
   
DUH... how embarrassing... Thanks ppolymorphe works perfect when ya do it right...
Member 10376725 13-Jun-16 15:52pm View
   
ppolymorphe.. I tried your suggestion, first I got an "Expected end of statement error" with the "[^]" highlighted. got rid of the "[^]" and then got a "Sub or Function not defined" error. In trying to 'second guess' the problem I put a '.' between the ActiveSheet and Property and now get a "Type mismatch" error. I have re-recorded the macro and with your changes it looks like this:
' Keyboard Shortcut: Ctrl+s
'
Range("A2:H35").Select
ActiveSheet.Application.ActiveSheet Property(Excel)[^].Sort.SortFields.Clear
ActiveSheet.Application.ActiveSheet Property(Excel)[^].Sort.SortFields.Add Key:=Range("C2:C35"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveSheet.Application.ActiveSheet Property(Excel)[^].Sort.SortFields.Add Key:=Range("A2:A35"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveSheet.Application.ActiveSheet Property(Excel)[^].Sort
.SetRange Range("A1:H35")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("A1").Select
End Sub

What am I doing wrong?
Member 10376725 9-Mar-16 14:07pm View
   
Sascha Lefèvre,

I am still using the 'Title' field as the unique key, and have coded in a Try/Catch block and it seems to work. Now when the record is saved to the datset how can resort the dataset to put the record in it's proper place. I have tried:

Me._D__DATA_FILES_DVD_LIST_MDFDataSet.Tables(0).DefaultView.Sort = "Title"

but it doesn't work. The new record still appears at the end of the list. If I restart the program the new record appears in the correct sequence.

Private Sub DVD_ListBindingNavigatorSaveItem_Click(sender As Object, e As EventArgs) Handles DVD_ListBindingNavigatorSaveItem.Click

If MessageBox.Show("SAVE THIS RECORD TO THE DATABASE" &
vbCrLf & vbLf & "Are you sure?", "SAVE RECORD",
MessageBoxButtons.YesNo, MessageBoxIcon.Stop) =
DialogResult.Yes Then
Try
Me.Validate()
Me.DVD_ListBindingSource.EndEdit()
Catch ex As Exception
If MessageBox.Show("Can not save record " & vbCrLf & ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error) Then
Exit Sub
End If
End Try

Me.TableAdapterManager.UpdateAll(Me._D__DATA_FILES_DVD_LIST_MDFDataSet)
MessageBox.Show("RECORD SAVED", "AS REQUESTED", MessageBoxButtons.OK, MessageBoxIcon.Information)
Me._D__DATA_FILES_DVD_LIST_MDFDataSet.Tables(0).DefaultView.Sort = "Title"

Else
MessageBox.Show("RECORD NOT SAVED", "AS REQUESTED", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If

End Sub
Member 10376725 28-Sep-15 18:09pm View
   
Maciej Los; Okay, Okay, scolding accepted. I tried to move the database as the instructions say to move it in 'Move Database Files' but get this error:

Msg 5011, Level 14, State 5, Line 1
User does not have permission to alter database 'DVD_LIST', the database does not exist, or the database is not in a state that allows access checks.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.

I ran SQL SERVER Management Studio in Administrator mode and get the same error. The weird thing is, the same Manager would allow me to back up the same database with no problem in either mode. I did manage to set the connection to the database through Server Explorer-Data Source and it works great but, I want to be sure I have good backups and know how to 'PROPERLY' move a database. Thank you for the assistance and if you have any other tidbits to help in this new problem it would be greatly appreciated.

darby
Member 10376725 25-Sep-15 18:24pm View
   
I don't know why I didn't notice this before, the error message refers tp a database named "C:\Data Files 092015\DVD_List.mdf" but the file name in the connection string is "D:\Data Files\DVD_List.mdf"(which is the correct file). At no time in this new project have I designated the file in C: which doesn't even exist anymore it was copied to D:\Data Files directory then deleted from the C: drive.
Member 10376725 25-Sep-15 17:38pm View
   
Tried that, get the same error message. I shut down the computer, restarted it, ran VS under administrator and still get the same error message. At first I got an error message that stated the server I was calling didn't exist so in advanced settings I changed the server name to SQLEXPRESS2014 (the Server name on this computer) then I get the above message.
Member 10376725 24-Aug-15 15:25pm View
   
Deleted
The first is a DataSet (DVD_ListDataSet), not a DGV, which is built from the database and ordered by Title. I then can page through DVD_ListDataSet and display each individual movie one at a time.
The second is another DataSet (srchDataSet) which is built off the original database, but includes only those records that meet the established search criteria entered by the user. I display the srchDataSet in a DGV (grdvwDVD_List) where the user is able to cursor through them and select a specific Title they would like to have the entire record displayed

This is the code that opens when the user clicks on the Title selection in the grdvwDVD_List.

Private Sub grdvwDVD_List_CellMouseClick(sender As Object, e As DataGridViewCellMouseEventArgs) Handles grdvwDVD_List.CellMouseClick
MovieListForm1.cellSelect = ""
Dim cell As DataGridViewCell
For Each cell in grdvwDVD_List.SelectedCells
MovieListForm1.cellSelect = cell.Value.ToString()
Next
MovieListForm1.again = False
End Sub
. I return this value (Title) back to the original DVD_ListDataSet and locate the record and display it.
If cellSelect <> "" Then
Dim userRow As DVD_ListDataSet.DVD_ListRow
userRow = DVD_ListDataSet.DVD_List.FindByTitle(MovieListForm1.cellSelect)
Me.DVD_ListBindingSource.DataSource = userRow
End If

This is where my problem arises, the record displays OK, but now the original DVD_ListDataSet appears to contain only that record in it. My original concept was to return to DVD_ListDataSet, move to the selected Title and display that record and still having the ability to page through all of the records. The only way to get back to the original DataSet is to restart the program. As long as I buiild a new DS, srchDataSet, for the search DGV shouldn't the original DS DVD_ListDataSet still be intact?
Member 10376725 21-Aug-15 12:17pm View
   
Deleted
Where did I loose you? I wish there was a way to show the screen shots then I could show what I am getting, and what I need to accomplish. The original data screen allows me to page through the movies 1 at a time. After the search I can only see the selected movie and cannot page through any others. I need to shut down the program and restart it. Apparently when I bring back the selected record I loose the original Dataset with all 470+ items in it. I'm sorry, I seem to be having a problem explaining it.