Hi.
I am new to SQL Server management.
I created a new database and also a table names customer. Saved my works.
Want ot know where the SQL database file has been saved because i cant find in the the sql server management folder located in my documents.
Also i tried to connect to that database from vb 2008 but in vain. i just cant see the database.
I am trying to automate a basic task using SQL Server 2005 Express.
Currently I have a query script that I run and then save the results as a CSV file. I need to do this on a daily basis and so I am looking to find out how best to go about this. There are a multitude of third party tools that claim to be able to do this - can anyone recommend this or enlighten me of the best way to set up this automation.
database file is not full and not limited to growth. As a matter of fact batch transactions are done but our proble is very slow. 28 records has been successfully save after 45 mins. Before it's just 5 minutes. Then some other process are not working. Is there anything that I must do? We have 460 tables in our software using SQL server 2000 and our application is using VB 6.0
Hello,I use SQL Server 2005 Express and I would liketo save on db of mine...Have I only to save the .mdf and .ldf data fileor I need to stop some service or other programs?Can I use some utility to schedule this?ThanksM.
My install of SQL Server 2005 runs like a dog. The SQL Management Studio splash screen lasts for 10 minutes, then when the Studio window appears it takes another 5 minutes to initialize.
I have SQL server installed on a Germane Server running Windows Server 2K, SP4. It has quad Xeon 2.8 GHz processors with 2GB RAM. 4 300GB drives in a RAID 5 configuration.
I have created 2 databases which I would like to save, uninstall SQL, then reinstall it. (I didn't install it the first time.)
I have 3 strings delimitted by a * character that I would like to save to a database. Each string will always have the same number of elements. strUserID = "1*2*3" strCompanyID="12931*12937*12945" strCompanyName="International Business Machines, Inc*Ford Motor Company*Delta Airlines" What I need to do is to save each record like this INSERT INTO tableA (UserID, CompanyID, CompanyName) VALUES (1, 12931, 'International Business Machines, Inc') INSERT INTO tableA (UserID, CompanyID, CompanyName) VALUES (2, 12937, 'Ford Motor Company') INSERT INTO tableA (UserID, CompanyID, CompanyName) VALUES (3, 12945, 'Delta Airlines') I've done something like this before with a single string, but don't know how to handle 3 of them. Dim strAlerts As String() = NothingstrAlerts = values.Split(",")Dim s As String For Each s In strAlerts SqlText = "INSERT INTO tableA (UserID, CompanyID, CompanyName) VALUES (" & lblUserID.Text & ", '" & lblCompanyID.Text & "','" & s & "')" cmd = New SqlCommand(SqlText, strSQLConn) cmd.ExecuteNonQuery() Next s Thanks for any help
has anyone got any opinions on the pros/cons of storing mp3 files in the database instead of the file system ? How could this be done ? Would it be a binary data type ?
Im using MS visual web developer. I have created a website and used the database they set up by using admin tools. One page requires the take the users comment and to save it into the database. I've tried a formview and connected it to the database which worked. the problem is i cannot save whatever the user types into the textbox. {insert query didnt work with this set up }INSERT INTO aspnet_Membership(Comment) VALUES ('CommentTextBox.Text') Error: cannot set userId or to null. and if i make it allow nulls its going to move on to the next column. I would appreciate some help please. Thank you in advance.
hi I have two questions: 1. I want a code to save data typed in a textbox during runtime using SQL server database. The database has a table with several colums where i have to reference the necessary column. 2. Can i use a Gridview to enter data during runtime and save the same data to the database? that is, INSERTING data to the database.
I'm looking for information that could tell me how to saving picture in a SQL database. The site is build on asp.net 2.0 and c#, and I'm using Visual Web Developer 2005 Express Edition. I would be thankful for some help.
Hi there, I have a web page (Visual Studio 2005, Asp.net 2.0) that has a series of textboxes and dropdownlists on it. I want people to be able to enter their information and click submit. When they click the submit button I want their information to save to a Sql Server 2005 database. I am having a lot of trouble finding any information on this topic. If someone could give me some sample code I would really appreciate it. Thanks
I'm using vs2008 programming in the latest vb.net and am pretty new to sql server. I looked up tuts and such to save changes to databases after I understood on how to connect to them get them to display and such. This is my code when I hit the "Save" button. It worked last time I was working on the program, now it doesn't, when I load up the program sometimes (i'm not sure why or under what circumstances) it'll load up the changes I made to the database through the datagrid and saved, but others it won't. What am I doing wrong? Here's my code:
Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click Try Me.Validate() Me.FinancialBindingSource.EndEdit() Me.FinancialTableAdapter.Update(Me.myDataSet.Financial) Catch ex As Exception MsgBox("Update failed") End Try End Sub
edit: It saves, but not completely. By that I mean, it'll save, but i'm not sure if it actually saves to the database or not. It will load back up with the data that I modified fine..unless I change any code in the program. Even if I just add a comment, the data reloads with the original data. However, if I don't touch code, it'll save my data fine. Why does it do this?
I have an application that connects and edits a database's tables.My question is, what is the best way to save who did what changes tothis database? I need to be able to display this in the application.The best way I have thought of so far is, to create a new table with'user', 'date', 'table_name', 'primary_key', 'old field_value' and'new_field_value' fields. Then I can save which table row had beenchanged, by which user and on which date.I'm sure that there is a way to do this in SQL Server, but I'm notsure how.Any help would be appriciated.Jagdip
Using: Compact Framework 1.0 and SQL Server CE 2.0
i want to save an image to my sql server ce 2.0 database on the device. In the Compact Framework 1.0 the Image class does not have .FromStream method, and the PictureBox class does not .Save method.
Has anyone done this before in SQL CE 2.0 and CF1.0
My english is not the best, but i will try my best.
I want to change the saving folder for the database from my systempartition to my datapartition (from c:labla to d:mydata), but i dont know how. I can see the folder but it is in gray font and unchangeable.
Heres my requirement from a financial analysis im doing...I have just calculated an industry averages on financial ratios...Now i wanna upload this industry average to the system...so that I can compare it to the individual companies' averages after calculating a particular company's average; meaning i wanna be able to call the industry average of a particular ratio (eg Current Ratio) after calculating a company's corresponding ratio...Is there a code fragment i can use for this ?? Thanks in advance...Adam
i work on sql server 2005 at home and have created a database with several tables and dabase diagram , now how do i transfer it to sql server 2000 which i work on at work , can somebody point me in the right direction in which this is done any hlp appreciated
Would anyone be able to tell me how to save a database and all its objects e.g. Procedures and views etc. onto a CD and then open it on another SQL Server? For SQL Server 7.0 and 2000.
I have a replicated table with a column which is used to store sound files - it is of type varbinary(MAX).
What is the best way to store a file from the filesystem inside this column on the PDA side (i.e. inside SQL Server CE) without loading the whole file into the PDA's memory, i.e. using some sort of buffering?
On full SQL Server 2005 I make use of UPDATE.WRITE() to save buffers inside the column - is there an alternative to this on SQL Server CE? Can anyone provide sample code / point me to samples that deal with SQL Server CE & BLOBs.
can some one help me. im using visual studio.net 2005. its a web application.i have a database with attribute name logo. so i want to upload an image and save it into the database and than display it into the image box to preview how the image looks like.can some one please help me as i am very new in using C# codes and visual studio.net 2005
hi I have binary files inside my database. and user should have the opportunity to download them from database to his computer. I don't want to retrive and save the file into the server first and then let him to download. is it posible??? thank you in advance regards
I am trying to save an uploaded picture filepath to a sql database record. The record that the filepath will be saved to will be the record determined by the logged in userid. I get an error stating Object not set to an instance of an object. This is my code for when the upload button is hitProtected Sub uploadbutton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles uploadbutton.Click If UploadTest.HasFile = False Then ' No file uploaded! UploadDetails.Text = "Please first select a file to upload..." Else ' Display the uploaded file's detailsUploadDetails.Text = String.Format( _ "Uploaded file: {0}<br />" & _"File size (in bytes): {1:N0}<br />" & _"Content-type: {2}", _ UploadTest.FileName, _ UploadTest.FileBytes.Length, _ UploadTest.PostedFile.ContentType) ' Save the fileDim filePath As String = Server.MapPath("~/ProfilePictures/" & UploadTest.FileName) UploadTest.SaveAs(filePath)Dim datasources1 As New SqlDataSourcedatasources1.ConnectionString = ConfigurationManager.ConnectionStrings("aspnetdb_connection").ToString() datasources1.UpdateCommandType = SqlDataSourceCommandType.Text Dim myUserID As String = Membership.GetUser().ProviderUserKey.ToStringdatasources1.UpdateParameters("userid").DefaultValue = myUserID datasources1.UpdateCommand = "UPDATE into profile_details (pic) VALUES (@filepath) WHERE ([UserId] = @UserId)" End If End Sub
Hi,Using VB.net I have created a custom object (hope my terminology is correct here), it’s just a class that defines a few string, integer, and hash table variables. After creating an instance of this class and populating it with data I need to be able to store this instance of my object in a sql server data base table. How do I do this? I saw an article that used the image data type to achieve this (code was in java unfortunately) is this the correct approach. Could you please give me some code examples Thanks
Hi,I'm using VS2005 and I'm trying to link the C# windows form to MSSQL.I used BindingNavigator Control to read the data. After that I addsqlcommand and sqldataadapter to send the data to the database. Mycode is thissqlDataAdapter1. InsertCommand. CommandText ="INSERT INTO SUDENT (" +"S_ID, S_NAME, S_ADDRESS, S_PHONE" +") VALUES ('" +S_IDComboBox. Text + "', '" +S_NAMETextBox. Text + "', '" +S_ADDRESSTextBox. Text + "', '" +S_PHONETextBox. Text + "')";sqlDataAdapter1. InsertCommand. ExecuteNonQuery( );It gave me this error"NulleferenceExcept ion was Unhandled"and " Object refrence not set toan instance of an object" so I add this linesqlCommand1 = ("INSERT INTO STUDENT (S_ID,S_NAME, S_ADDRESS, S_PHONE)VALUES (@S_ID,@S_NAME, @S_ADDRESS, @S_PHONE) " ,sqlConnection1) ;Then it gave me some stupid error. By the way it didn't make a newobject of SqlCommand although I tired ....So can u help me to solve my problem ? Thank you
I am brand new to SQL. Have limited coding experience w/ Visual Basic and database ops w/ Access.
I have come into possession of a SQL 2005 database. The problem is that the designer tried to re-invent the wheel and code a very very poor LMS back end for tracking and reporting. I would like, if possible, to save the database and as far as I am aware - should be able to import into Access and generate statistics and reports to my hearts content.
I have tried w/out success to save the database going through SQL Server Management Studio Express.
Any help or information that could be provided would be appreciated. Any additional information that I can provide, please let me know.
Hi, I€™m using VS2005 and I€™m trying to link the C# windows form to MSSQL. I used BindingNavigator Control to read the data. After that I add sqlcommand and sqldataadapter to send the data to the database. My code is this
Hi, I am designing a site using Visual Web Developer, CSharp and Sql server Express. One the contact page I want to put a form that allows users to enter details about themselves. On clicking the button this will be stored in the database under a table called subscribers. The form will have, name, address, telephone, email fields etc. With the email addresses from the visitors I want to be able to keep them in a newsletter section or similar which is automated so they recevie emails from time to time Could somebody suggest a tutorial which shows how to complete this process using c sharp and sql.
Can someone provide information or a link to information regarding the pros and cons of saving files directly into a SQL 2005 database? I'm actually for saving files to a database (cleaner implementation then just saving the location then having to get the file, etc), but my project manager is not convinced so I need to make an argument for (or against depending on what I actually find out) using varbinary data type. Thanks.
I am working on a project that contains several databases in SQL and many settings. The problem I am encountering is that I want to be able to update the program for all my customers. That is no problem.
The problem I am meeting is where, when the program is updated, all the settings and all the information in the databases reverts to the default values, or the values that were compiled with the new update.
I want to be able to update their program without deleting all the settings they have.
When i click upload image button when my database table has no any row, the selected image is saved(one row saved in table). If i continue and select a different image, i get no error sa if the image has been saved but when i view the images i have been saving, its strange even if i saved 10 records they all contain the first image that i saved. In short only the first image is saved the rest of the rows are just duplicates of the first row. so it basically becomes a table of ten rows but with same data rows(same image). Code is below. Protected Sub btnupload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Dim intLength As Integer Dim arrContent As Byte() If FileUpload.PostedFile Is Nothing Then Lblstatus.Text = "No file specified." Exit Sub Else Dim fileName As String = FileUpload.PostedFile.FileName Dim ext As String = fileName.Substring(fileName.LastIndexOf(".")) ext = ext.ToLower Dim imgType = FileUpload.PostedFile.ContentType If ext = ".jpg" Then ElseIf ext = ".bmp" Then ElseIf ext = ".gif" Then ElseIf ext = "jpg" Then ElseIf ext = "bmp" Then ElseIf ext = "gif" Then Else Lblstatus.Text = "Only gif, bmp, or jpg format files supported." Exit Sub End If intLength = Convert.ToInt32(FileUpload.PostedFile.InputStream.Length) ReDim arrContent(intLength) FileUpload.PostedFile.InputStream.Read(arrContent, 0, intLength) If Doc2SQLServer(txtTitle.Text.Trim, arrContent, intLength, imgType) = True Then Lblstatus.Text = "Image uploaded successfully." Else Lblstatus.Text = "An error occured while uploading Image... Please try again." End If End If End Sub Protected Function Doc2SQLServer(ByVal title As String, ByVal Content As Byte(), ByVal Length As Integer, ByVal strType As String) As Boolean Try Dim cnn As Data.SqlClient.SqlConnection Dim cmd As Data.SqlClient.SqlCommand Dim param As Data.SqlClient.SqlParameter Dim strSQL As String strSQL = "Insert Into Images(imgData,imgTitle,imgType,imgLength,incident_id) Values(@content,@title,@type,@length,@incident_id)" Dim connString As String = "Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|safetydata.mdf;Integrated Security=True;User Instance=True" cnn = New Data.SqlClient.SqlConnection(connString) cmd = New Data.SqlClient.SqlCommand(strSQL, cnn) param = New Data.SqlClient.SqlParameter("@content", Data.SqlDbType.Image) param.Value = Content 'cmd.Parameters.AddWithValue(param) cmd.Parameters.AddWithValue("@content", Content)
param = New Data.SqlClient.SqlParameter("@title", Data.SqlDbType.VarChar) param.Value = title cmd.Parameters.Add(param) param = New Data.SqlClient.SqlParameter("@type", Data.SqlDbType.VarChar) param.Value = strType cmd.Parameters.Add(param) param = New Data.SqlClient.SqlParameter("@length", Data.SqlDbType.BigInt) param.Value = Length cmd.Parameters.Add(param) cmd.Parameters.AddWithValue("@incident_id", id.Text) cnn.Open() cmd.ExecuteNonQuery() cnn.Close() Return True Catch ex As Exception Return False End Try End Function