I have an InfoPath form that submits data to a .NET webservice. The webservice parses the infopath form and inserts the data into a database. The database is SQL Server EXPRESS.
I have however run into some problems. The InfoPath form is within SharePoint and I noticed that when I submit the data, it only shows up in the database as a new record 9 out of 10 times. That is for every 10 submissions of the form, there are only about 9 new records in the database. The ID field (an autoincrement field) also skips a number indicating the the transaction may have failed.
However, when I test the form on my local PC, it inserts a new record for every submission.
The webservice and database are on a remote server not my local.
Does anyone have any ideas? Could it be a deficiency of SQL Server Express?
Any ideas, answers or suggestions would be much appreciated.
Hello, I have an asp.net application which connects to SQL Server 2005 database. One out of 15 times (approx) the applicaiton does not make connection to the database and an exception is thrown. I am not sure how to debug this. Should I write some code which can make connections in a loop to test how much stress the sever can handle? Kindly suggest some ideas. Thanks.
I have two SQL Express database and I want to do two things. One is to transfer a table over to the other database. Two, move the files from one table in one database to another. Please let me know when you get a chance.
HiOracle 8.1.7.4Hp Unix 11Application run peoplesoftLogon_time from v$session shows Friday Jan 3.The database was haltedon Saturday Jan 4.What is logon_time supposed to represent.All inquiries so far does notindicateThanks for your inputVincento
Hi there, I am in the process or deploying our existing .NET 1.1 application together with its SQL Server 2000 databases to 2 new hardware platforms (one for databases and one for application). I have transferred the databases and installed the application (using our installers). I have tested the database logins and checked the database user rights - everything is fine - or so it appears to be. However, when I try to open the application it receive the following exception [Exception: Data Source=172.16.7.1;Persist Security Info=False;UID=myAccount; password=myPassword;Connect Timeout=60;;Initial Catalog=http://xxx.xx.x.x/directory/myPage.aspxMYDATABASE;Pooling = 'false';Application Name=WEBAPP; System.Data.SqlClient.SqlException: Cannot open database requested in login 'http://xxx.xx.x.x/directory/myPage.aspxMYDATABASE'. Login fails. Login failed for user 'myAccount'. at System.Data.SqlClient.SqlInternalConnection.OpenAndLogin() at System.Data.SqlClient.SqlInternalConnection..ctor(SqlConnection connection, SqlConnectionString connectionOptions) at System.Data.SqlClient.SqlConnection.Open() at FrameWork.DataServices.DBConnect.GetInternalConnection(Int32& icnt)] FrameWork.DataServices.DBConnect.GetInternalConnection(Int32& icnt) +655 FrameWork.DataServices.DBConnect.GetInternalConnection() +16 FrameWork.Components.DBComponent.get_m_SqlConnection() +59 FrameWork.Components.DBComponent.ExecuteReader(SqlCommand cmd, Int32 iRetry, Boolean bIgnorecase) +53 FrameWork.Components.DBComponent.ExecuteReader(SqlCommand cmd, Boolean bIgnorecase) +337 FrameWork.Components.DBComponent.ExecuteReader(SqlCommand cmd) +7 It appears as if my ADO connection string is faulty. If a manually connect using a connection string in the format I expected it to be, everything works. Here are my manual connection string: Data Source=xxx.xx.x.x;Persist Security Info=False;UID=myAccount; password=myPassword;Connect Timeout=60;;Initial Catalog=MYDATABASE;Pooling = 'false' What is inserting the URL that I used to open the page ahead of my Initial Catalog parameter?Any assistance will be more than welcome.CJ
Hello there,I'm to asp.net, so please be patient :DMy question is, how do I simply add some data to my database? - With vb.net code, not a grid view or something like that..I want to connect to my database, insert some data to a table.It shouldn't be that hard?- Hope someone will take the 5 minutes, and help me :)Regards Jeppe
I'm new to asp.net and I have gotten quite far with books and such but I'm stuck at this point. I have a web form that is mostly populated with data pulled from AD and all the user does is make a selection in two drop lists and enter their initials to sign. I can't figure out how to insert a record into a table when buttin pressed. I verified that all the data types are correct so it shoud pass the info but its just not going anywhere. I've atached the code below. Thanks,protected void accept_btn_Click(object sender, EventArgs e) { string adPath = LDAP://DC=********,DC=***; //Path to your LDAP directory servermembers adAuth = new members(adPath); string username = Context.User.Identity.Name; string computer_name = System.Environment.MachineName;string comp_type = comptype.SelectedValue.ToString(); string install_type = installtype.SelectedValue.ToString();string date = DateTime.Now.ToString(); string email = adAuth.getemail(Context.User.Identity.Name);string agree = initials_txtbox.Text;string title = "Office"; test_lbl.Text = (username + " " + computer_name + " " + comp_type + " " + install_type + " " + date + " " + email + " " + agree + " " + title);
I have a web form with a text field that needs to take in as much as the user decides to type and insert it into an nvarchar(max) field in the database behind. I've tried using the new .write() method in my update statement, but it cuts off the text after a while. Is there a way to insert/update in SQL 2005 this without resorting to Bulk Insert? It bloats the transaction log and turning the logging off requires a call to sp_dboptions (or a straight-up ALTER DATABASE), which I'd like to avoid if I can.
When I downloaded/started using Visual Web Developer I was under the impression that I needed to install SQL Server Management Studio Express in order to create/manage databases, and to provide the engine to access the data. Since then I have found tutorials and have successfully created/used databases solely from within Visual Web Developer. I'm assuming that Visual Web Developer includes a database engine, much like the webserver that is included. (This is an awesome thing). When I tried to upload my web application with database to my production server, the database would not work, it started working after I installed SQL Server Management Studio Express on the server. Is it my understanding that you need SQL Server Management Studio Express if you do not have Visual Web Developer Express installed in order to provide the data access engine? Also, I am unable to "attach" my Visual Web Developer Express created database to SQL Server Management Studio Express. Are there any posts that provide more information about this topic?
The only reason I'm asking is that I have extra whitespace on the end of my text fields, and I thought ANSI_PADDING was turned on. I do not see the option in Visual Web Developer Express, but have found it in SQL Server Management Studio Express.
I have VC++ express and MSSQL SMS express and have an application working nicely locally. The Data explorer and data connections part works really easily.
Now, I want to make the application available to my home network.
I mapped the drive where the database is and called it Z: so I could put my "release" on my other network PC and assumed it would find Z: if I mapped the shared network drive on that machine and called it Z:
But: I can't even add the mapped connection on the local machine, I get:
The file "Z:databasescalorie.mdf" is on a network path not supported for database files. An attempt to attach.....etc"
It works fine on the original F drive.......
Am I approaching this the wrong way. How should I distribute to network PCs?
I am a newbie so i apologies beforehand for any mistakes i make on this forum. Anyway, i created an asp.net website using the MS Visual Web developer tool. This has a couple of SQL SERVER databases within it. I then latervinstalled the SQL SERVER management studio express in order to manage the SQL SERVER DBs that i had as part of my website but they do not appear within the management studio db list. As this is the express version, is there anyway of importing the existing SQL SERVER dbs that i have to the management studio so i can manage them from there?
I get an error dialog when I try to create a new SQL database, both via the Add New Item dialog and the property wizard of a new SqlDataSource control. The error is:
Local Database File:
User does not have permission to perform this action.
I've searched for help with this.
I ensured the App_Data folder exists and I added the local ASP.NET account to the group that have R/W access to it (although the RO flag is in an unchangeable tri-state on the folder). The SQL Server Express error log is clean and indicates full functionality. Everything is running locally. No VWD installation errors.
Here is the error message I get:http://img109.imageshack.us/my.php?image=error2ug.jpgI have just installed both packages and havent done much in the way of configuration... What do i need to do? Thanks!
Okay, I've read massive topics on ClickOnce, and embedded database applications, etc, etc.
I need a handful of good suggestions how I can create a deployment package, to get my sql express database onto a SQL Express server.
The database will need to be multi-user, because I am also developing a WinForms application to connect to the SQL Express database.
I'm thinking I need to use some automated scripting features, to generate scripts for the database once I am done (unless you have a better suggestion).
After that, I need to know what to do with those scripts, and how can I create a setup / deployment packages to run those scripts against a SQL Express server.
The other alterntative obviously is to copy my sql express database, and run an attach command. This will work the first time, only because this will have been the first deployment of this database.
Please keep in mind when answering this question, that I will not be embedding the database, and as far as I understand ClickOnce is a feature for use with embedded databases or user instance databases (not sure).
Hi, I'm completely new to SQL Server and ASP.NET, so please bear with me on my learning curve! I've installed Visual Web Developer Express and SQL Server Express (on the same PC). I then used Web Developer Express to successfully create a new database with a couple of tables in it. So far so good. I then installed SQL Server Management Studio Express on the same PC and tried to connect to my new database. The connection to the SQL Server instance appears to work OK (using Windows Authentication) but I can't see the database I previously created. All I can see are the System Databases. Does anyone know what the solution might be?
In the last one and half years, I used the Northwind Database in SQL Server Management Studio Express (SSMSE) to learn the programming of SqlConnections, Data sources, Database Exploere, ADO.NET 2.0, etc. via VB 2005 Express.
The Northwind Database in my SSMSE got lost very often, but I was not aware of it. How can I know where the Northwind Database is used or processed by my VB 2005 Express projects that were the examples of some tutorial books or my trial projects? How can I release the Northwind Database back to my SSMSE from the VB 2005 Express projects? Please help and advise.
I am new to this type of programming and and have read all articles on adding an image to the database and it seems they all use sql queries to add an image but I want to add an image at design time. I am using Visual Basic 2005. I am also using Visual Basic 2005 Express Edition to try the same thing. I am trying to build a Translator program for english to Brazilian Portuguese and the reason I want to add the images is so that when I translate the word cat from english to Portuguese, I can also show an image of a cat. Can anyone please help me
Can VB 2005 express able to connect remote SQL 2005 express database? I played with connection string many time and still could not success! Thanks all.
Hi all, I have read/studied (i) Working with Databases in Visual Web Developer 2005 Express in http://quickstarts.asp.net/QuickStartv20/aspnet/doc/data/vwd.aspx, (ii) Xcopy Deployment (SQL Server Express) in http://msdn2.microsoft.com/en-us/library/ms165716.aspx, (iii) User Instances for Non-Administrators in http://msdn2.microsoft.com/en-us/library/ms143684.aspx, and (iv) Embedding SQL Server Server Express in Applications in http://msdn2.microsoft.com/en-us/library/ms165660.aspx. I do not understand the concepts and procedures to do Xcopy and User Instances for non-administrators completely-I do not know how to connect to databases and create database diagrams or schemas using the Database Explorer. I have a stand-alone Windows XP Pro PC. I have created a ChemDatabase with 3 dbo tables in the SQL Server Management Studio of my SQL Server Express and a website of my VWD Express application with an App_Data folder. I am not able to proceed to use Xcopy and user instance to bring the 3 dbo tables of ChemDatabase to my App_Data folder. Please help and give me some detailed procedures/instructions to bring the 3 dbo tables of ChemDatabase (or ChemDatabase itself) from the SQL Server Management Studio Express to the App_Data folder of the website of my VWD Express project? Thanks in advance, Scott Chang
I'm trying to connect to the northwind database thats available online using c# and SQL 2005, both express editions. i used the following command
sqlcmd -S yourServerSQLExpress -E -iinstnwnd.sql
and it connects to the northwind database. but when it comes to the part where i have to select the data source, there are only 2 available - microsoft access database file, microsoft SQL server database file. but according to the microsoft books that i'm following, there should also be a "micosoft SQL server" in the data source list. because of this i cant connect to the database.
In the end of the post, there is my vba functions and query to create datatable. I got a run-time error message on the red line in the function. It says: [sql native client] string data right truncation. Did I do sometime wrong? Thanks for your time!
-L
Sub test() Dim BinaryStream Set BinaryStream = CreateObject("ADODB.Stream") Dim mConn As ADODB.Connection 'read the file data to bytes 'Specify stream type - we want To get binary data. BinaryStream.Type = adTypeBinary 'Open the stream BinaryStream.Open 'Load the file data from disk To stream object BinaryStream.LoadFromFile file Dim mCmd As ADODB.Command Set mCmd = New ADODB.Command With mCmd ' define query .CommandText = "INSERT INTO TEST (FDATA) " & _ "VALUES (?)" .CommandType = adCmdText ' add parameter .Parameters.Append .CreateParameter("@P1", adVarBinary, _ adParamInput, BinaryStream.Size, BinaryStream.Read) End With ' open db connection mConn.ConnectionString = _ "Driver={SQL Native Client};Server=.SQLEXPRESS;Database=XXXX;Trusted_Connection=yes;" mCmd.ActiveConnection = mConn 'run-time error: [sql native client] string data right truncation mCmd.Execute mConn.Close End Sub
GO /****** Object: Table [dbo].[TEST] Script Date: 10/04/2007 11:06:50 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[TEST]( [ID] [int] IDENTITY(1,1) NOT NULL, [FDATA] [varbinary](max) NOT NULL ) ON [PRIMARY]
I've been doing a lot of research lately to determine the most secure way to issue an insert statement to insert my data into my SQL database. I'm coding this following using Visual Basic: Protected Sub submitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim strConn As String = "server=.SQLEXPRESS;database=C:SJ-siteSJApp_DataSJDb.mdf; User Id=user; password=password" Dim MyQuery As String = "Insert into sjTable (PostID, Category, TitleofPost, Description, Price, Loc, ContactInfo, DatePosted, Disclaimer) Values (@Category, @TitleofPost, @Description, @Price, @Loc, @ContactInfo, @DatePosted)" Dim MyConn As New Data.SqlClient.SqlConnection(strConn) Dim cmd As New Data.SqlClient.SqlCommand(MyQuery, MyConn) Dim curDate As String On Error Resume Next
MyConn.Open() If Err.Number <> 0 Then MsgBox("There was an error connecting to the database.", MsgBoxStyle.OkOnly) Err.Number = 0 End If
curDate = Now() With cmd.Parameters .Add(New System.Data.SqlClient.SqlParameter("@Category", categoryDropDown.Text)) .Add(New System.Data.SqlClient.SqlParameter("@TiteofPost", titleTextbox.Text)) .Add(New System.Data.SqlClient.SqlParameter("@Description", descriptionTextbox.Text)) .Add(New System.Data.SqlClient.SqlParameter("@Price", priceTextbox.Text)) .Add(New System.Data.SqlClient.SqlParameter("@Loc", locationTextbox.Text)) .Add(New System.Data.SqlClient.SqlParameter("@ContactInfo", contactTextbox.Text)) .Add(New System.Data.SqlClient.SqlParameter("@DatePosted", curDate)) End With If Err.Number <> 0 Then MsgBox("There was an error inserting the data into the database.", MsgBoxStyle.OkOnly) Err.Number = 0 End If
MyConn.Close() If Err.Number <> 0 Then MsgBox("There was an erro closing the database connection.", MsgBoxStyle.OkOnly) Err.Number = 0 End If Server.Transfer("submitted.aspx")
End Sub The code gives no errors, it directs me straight to the submitted.aspx page but when I query the database it is not inserting any data into my database. .My Error log shows the following:2006-06-27 12:14:16.68 spid51 Starting up database 'C:SJ-SITESJAPP_DATASJDB.MDF'.2006-06-27 12:14:26.93 Logon Error: 17828, Severity: 20, State: 3.2006-06-27 12:14:26.93 Logon The prelogin packet used to open the connection is structurally invalid; the connection has been closed. Please contact the vendor of the client library. [CLIENT: <local machine>]I am able to log into the database using my account via SQL Server Management Studio Express. I've been all over the forums and google looking for a solution but everything I've been trying to mock up from other people's code hasn't helped. Thanks in advance for your assistance
I have the following insert parameter and insert command which are attached to a templated textbox, I have made the textbox's visible property false so the user will not enter any text. I have a session variable session("test") = 500. I would like the value of the session variable to be inserted into the testcode field. I can not seem to find any workable syntax.<InsertParameters> <asp:Parameter Name="TestlCode" Type="Int32" />InsertCommand="INSERT INTO [Mycd] ( [TestlCode], .. VALUES ( @testcode ,
Periodically an INSERT query takes anywhere from 30 to 90 sec's to execute. But once it completes, execution times then return to 0 or 1 sec. This has begun to occur more and more frequently, typically every thirty minutes or so now. The only way I have found to clear the problem is to execute the INSERT from SQL Studio and just wait for it to complete. Then everything returns to normal, until it hangs again. The application that commands the INSERT can not be made to just wait for 90 seconds, so I need to know how to eliminate the intermittent delay. What could be causing this problem, and how can it be corrected?
I'm completely new to ASP.NET. I want to insert data to the SQL SERVER EXPRESS database.When the button clicks i want to add the details into database.This is the coding i did with online help. Can you help me to do a good coding ad some error showing on my 7th line("connection.Open()").. And can you advise me to do correct coding for how is get data from database and display it on web page. Thanks in advance.And here is the coding i did to Insert data, Imports System.Data.SqlClient Partial Class _Default Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim connection As New SqlConnection(" database=share") Dim cmd As New SqlCommand("INSERT INTO sdetails (cid, cname, date, qty, pps)VALUES('" & txtcid.Text & "','" & txtcname.Text & "','" & txtdate.Text & "','" & txtqty.Text & "','" & txtpps.Text & "')", connection)
Hi, i'm creating registeration form using VS2005, i want to insert values in sql server express 2005. i've coded but it is giving error plz hava a look for example my database name is Database1 and table is table1 and columns are name,title. here i'm getting error : connectionstring does not exist.
code as folllows SqlConnection connection = new SqlConnection(ConnectionString1); string cmdString = "Insert into Table1(name,title)VALUES( @Name,@title)"; SqlCommand cmd = new SqlCommand(cmdString, connection); cmd.Parameters.Add(new SqlParameter("@name",txtNameText)); cmd.Parameters.Add(new SqlParameter("@title",txtTitle.Text) ); connection.Open(); cmd.ExecuteNonQuery(); connection.Close();
im having an issue with sql server 2005 express on a test box. in recent testing, ive encountered errors with the database that i havent encountered before. im trying to use an app to add records to some tables in a database, 1 record at a time. but in doing so i get this
"The transaction log for database 'ScanOrder2' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases"
with every insert of a record.
this process was working fine 2 days ago and i cant find anything thats been changed. - i deleted the database and tried restoring it from a backup that is known to work, but still has the issue - the recovery model is set to simple. every night a batch script is run to truncate the log file in case there is a transaction that uses a lot of records - i can insert and delete records manually with no problems (ie going in through SSMSE and highlighting a row and deleting it or adding random data) but i still cant add it through the app - the log file is set to autogrow unrestricted at 10 megs at a time. - i even tried setting the log file to 500 megs starting size, and still couldnt even insert 1 record - when i check the log_reuse_wait_desc, it says NOTHING, when not running and while running.
is there any other setting i could be missing that might attribute to this?
I actually work in an organisation and we have to find a solution about the data consistancy in the database. our partners use to send details to the organisation and inserted directly in the database, so we want to create a new database as a buffer database to insert informations from the partners then make an update to the main database. is there a better solution instead of that?
I'm trying to learn some VB programming with the VB 2005 Express Absolute Beginner Series video tutorials (which I think is great) and have come across a problem that I can't solve.
When I follow the instructions in Lesson 9 (Databinding Data to User Interface Controls) my application will display the data from the database correctly and I can edit it (and as long as the debugger is running the data remains changed). However, the changes won't propagate back to the database. I don't get any error messages but after I edit the data, save (with the save button on the BindingNavigator toolbar), and end debugging the data in my database remains unchanged. When I use a MessageBox to show how many rows where edited/updated in the
I get the correct number back. I'm sure the problem is not due to coding errors since I've also tried running the accompanying Lesson 9 project file that can be downloaded from MSDN and the problem persists.
I'm using Windows XP SP2, SQL Server 2005 Express Edition and VB 2005 Express Edition. I've tried installing SQL Server 2005 Express with a number of different settings, including default settings, but it doesn't make any difference.
Would greatly appreciate any feedback on this as I'm keen to resolve this problem so I can get on with the next tutorial lesson.
I am using two database server. Both are sql server.
My task is :I want to insert data from server 1 table to server 2 table and update same when modified the existing data from server 1. is it possible to do the integration in single package.
I know to do insert and update seperately by ssis but need to do same with single task.
I recently added a new user to my database. Now I want to delete that user, but I keep getting the error above. What do I need to do to delete my recently added user?