Does anyone know how I can fix this?
In MSSMS I'm running query's where I want the result to be saved to file.
I choose that option in the toolbar and it was working find until yesterday when it stopped asking me where I want to save the result.
It's running the query and tells me that the "Query executed successfully" but I don't know where the result went. I've looked in the default folder for where MSSMS is supposed to save files but there is no new or just updated file there.
The only thing I tried so far is switching back and forth between result to grid and to file. And of course restarted my computer.
Related
I ended up corrupting my database to where every time I attempt to open it, I get error 3022, "changes you requested to the table were not successful because they would create duplicate values in the index."
Recovery of the file does not seem possible and my previous back up is a month ago. I have been able to extract everything but the Modules, which is what I need to recover the most. None of the standard ways I have found work because they require the ability to open the database (For example, trying to set it as a VBA reference still give the same error.)
Is there any way to get the modules or code out of the file without opening it?
Edit:
Was finally able to get access to the file. Using DBEngine.CompactDatabase it was able to do a compact and repair. The issue has boiled down to the "MSysAccessStorage" table is corrupt, and says "Id is not an index in this table". I know have access to everything, except the modules, which I can't open without the MSysAccessStorage working.
I'm going to keep poking at it but I'm not sure what options I have for fixing a system table. Any ideas would be helpful.
Unfortunately, the Visual Basic for Applications project has been corrupted. The original database doesn't even have any VBProjects when listing a count. I'm going to call this one a lost cause. Thanks everyone that tried to help.
im working on my first big program. I will try to explain short how the important part of the program works, and then try to explain what my problem is.
My program is used by few people, they drive around the Europe and repair our machines. After the work, they start my program, and write a report. Until now the program was generating at the end 3 Files. (PDF file generated by printform, text file which contained the same information's again and the last file that was an Excel file, that one contained Data that was written inside the Datagridview.
These workers, used Email to send all 3 files separated. As you imagine, sometimes that can end bad, cause after work they are tired and sometimes they send the wrong files. So I made a upgrade, which gives the user a possibility to send the files directly from the Program, being sure everything is fine. In background I created a directory where 2 of 3 files always get saved. The problem is, while using printform, there opens a window where the user can select the path. And here start the troubles, some of the workers select different a different path, but then my program wont find the files again(its very important that are 3 files are together). I searched for something that would look like
dim printformpath as string = printform.getpath
is there something that works that way? I was searching but I didn't found anything helpful.
Thank you for understanding & help
Thanks, I added the path to the printFileName property and changed printform settings from Print to preview to print to file :)
Have a nice day
I have been working on building a new database. I began by building the structure within the database it is replacing and populating this as I created each set of tables. Once I had made additions I would drop what had been created and execute the code to build the structure again and a separate file to insert the data. I repeated this until the structure and content was complete to ensure each stage was as I intended.
The insert file is approximately 30mb with 500,000 lines of code (I appreciate this is not the best way to do this but for various reasons I cannot use alternative options). The final insert completed and took approximately 30 minutes.
A new database was created for me, the structure executed successfully but the data would not insert. I received the first error message shown below. I have looked into this and it appears I need to use the sqlcmd utility to get around this, although I find it odd as it worked in the other database which is on the same sever and has the same autogrow settings.
However, when I attempted to save the file after this error I received the second error message seen below. When I selected OK it took me to my file directory as it would if I selected Save As, I tried saving in a variety of places but received the same error.
I attempted to copy the code into notepad to save my changes but the code would not copy to the clipboard. I accepted I would lose my changes and rebooted my system. If I reopen this file and attempt to save it I receive the second error message again.
Does anyone have an explanation for this behaviour?
Hm. This looks more like an issue with SSMS and not the SQL Server DB/engine.
If you've been doing few times, possibly Management Studio ran out of RAM?
Have you tried breaking INSERT into batches/smaller files?
I'm trying to determine if a file exists by using the line:
=system.IO.File.Exists("C:\camera.log")
I know for a fact the file exists. But no matter how I phrase the line of code, it always returns false. I've changed the permissions in RSPreviewPolicy.config and rssrvpolicy.config to no effect. I'm running the report locally, so permissions shouldn't come into it.
Please let me know if I can provide any further information.
UPDATE: The line works fine in a regular Console Application. So far as I know, this problem is unique to .rdlc reports.
UPDATE 2: It also works on previewed SSRS reports. But I have verified it also doesn't work on another .RDLC report.
Im using sql database and making a program with vb. i use this code for my data to save to database:
DerslerTableAdapter.Insert(CDate(Me.Label15.Text), Me.Label9.Text)
DerslerTableAdapter.Fill(Verilerim.Dersler)
i stop the program. Then run it again. I can see the data i saved, its ok. but i cant see it when i look "database explorer"->"tables"->"dersler"->"show table data".
when i run the program again i can see my data ok. then i save my project and run it again. There is no data. Icant see it. Does the program runs properly?
TableAdapter.fill() executes the query, so I believe that you need to use TableAdapter.update() to commit the changes to your datebase. Overall I would like to see more code to get a feel for what is going on.
Sounds like you are not committing your changes to the database.