I am creating a windows application that is not going to be used in a controlled environment like a LAN or some other network, so I want to include a local database in the install of this app. Ideally, I would like to use SQL 2005 Express like you would MSDE or Access, but I am not sure if the user must have SQL Server installed on their machine in order for this to work and I don't have a machine without it to test on.
I am having a problem with connecting to SQL Server 2005 database from Office Business Scorecard Manager 2005 (the connection string i am using is: provider=SQLOLEDB;Data source=server_name; Initial catalog=database_name). But the connection failed. Would please any experts here shed me any light on what is the problem and how to fix it then? As there is no any forum for Office Business Scrorecard manager 2005. Therefore I post my thread here as it is related to the connection to SQL Server 2005 database engine, thought here is the best place for this question.
Thank you very in advance for your kind advices and help. And I am looking forward to hearing from you soon.
I have a login page that checks the given userid/password against ADSI and redirects the user if successful. My problem seems to come when I try to connect to the SQL database with the user's NT credentials. I have the user's NT account setup in SQL, have anony. disabled in IIS, using Integrated Windows Security in IIS, and am using the following connection string:
I also have this entry in my Web.Config file: <identity impersonate="true" />
Actually, it seems to connect OK, but I can not select any data. I just receive "Select permission denied...." errors even though the user has been given these permissions in SQL.
I just got a dedicated server to run my websites and SQL Server and MS SQL 2005 Express was installed as it will be more then enough to handle the needs of my DBs right now. The problem I am getting is that when I try to connect to the server from Management Stuido Exrpess (from the server it's self) I recive this error:
quote:provider: Named Pipes Provider, error:40 - Could not open a connection to SQL Server Microsoft SQL Server, Error: 2
And when from a remote computer I get: quote:provider: Named Pipes Provider, error:40 - Could not open a connection to SQL Server Microsoft SQL Server, Error: 53
I have gone into the Service Area Configuration and made sure that it is set to accept TCP/IP and Named Pipes connection from remote computers and then restarted the dataebase engine.
Can anyone help me? Since this is a dedicated server I have to pay for there support and want to see if I can avoide that
-- If I get used to envying others... Those things about my self I pride will slowly fade away. -Stellvia
Hello, My company Intranet has a form that agents can use to post their comments about the company to upper management, but our customer service department would like to modify the form so that the agent has to pick from a comment type. The dropdown options on the form will be as follows: ComplimentsComplaintsGeneral CommentsSuggestions Each dropdown option has a designated table in a SQL DB.Using postback on the same page, I need to change which fields of the form are visible based upon which dropdown selection the user chooses, and I need the fields to then be inserted into the table that corresponds with the dropdown selection item. For example: If the Compliments dropdown selection is picked, I need a text box to show for the user's location, the name of the customer, account number, and the message box. Once the submit button is clicked, the characters in these boxes need to be inserted into the Compliments table using its data adapter. However, if the user selects Suggestions, the name of the customer and the account number should not be visible, since these fields do not exist and when the submit button is pressed, the Suggestions table should be updated. If you need more information, I will provide whatever is needed. As always, thanks for everyone's assistance. Chris
Hi, I got a problem. I installed Microsoft SQL Server Management Studio Express 2005 version. And I created a Compact database. I created an connection in SSMSE to connect the database and opened a query form. then, i run the following sql:
Select * from Table1
It returned 3 records to me. After that, I used program to insert record into this table. Then i ran this sql again, it still show me 3 records. I closed the query form, and re-created a new query form, then run the sql, it returned 4 records to me.
Why? It's very strange and difficult to operate, right? Is there anyone know how to make the SSMSE to return whole records without any close query form and re-create query form operation?
Hi everyone, What is the main difference between first form normalizations and second form normalization ? In my opinion, they are both generated for the same operation which is to prevent redundancy(in other words; duplication of data in several records). So would you please explain it to me ?
Hello I got a sql server express that i am trying to connect form win or web forms(2.0) €“ express as well.
My problem: Can not connect to the server in any way! Even the designer cont find any sql server on my machine; for example "the data source configuration manager" (gui) in enyn way its can not find the sql server express (2005)
So my question is: if all what i used is the express version - is it possible to connect and use the sql.s express form the vs. express
I'm having a problem connecting with a Java application but I CAN connect using my .Net application - the user name and password are the same for both (using the same database on SQL Server Express 2005).
The error I get is: "com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open database "CORNERS" requested by the login. The login failed." An interesing note - I get the same message if the database is not running.
SQL Server Express 2005 is installed in mixed mode.
Here is my connection string in the .Net appplication: <add key="connectString" value="Server=(local);UID=sa;PWD=myPasswd;Database=CORNERS" />.
HiI have a Platinum database which stores dates in integer form e.g the dateis formatted as below:Column_name Type Length Precision------------------------------ ------------------------------from_date int 4 10Some of the dates in the Platinum database are as follows:729115729359730059730241730302730455How can I bring them into SQL 2000 as valid dates.Thanks for your assistanceSam CJoin Bytes!
I'm trying to take data from a form and insert it into a SQL database. Everything works fine until I try inserting a number with the comma separator in the number field. The data type in SQL is integer. Are there any special settings to get SQL to accept a comma separated number using ASP?
Hi, i have created a mini form to test out easy steps and my sql connection but something is wrong with my connection i think...
I am running windows XP Pro SP 2. i have Microsoft VisStudio .NET 2003 fully installed and now im installing SQL Server 2000 Developrs Edition. I just cimpleted the installaion and picked some settings:
Local Computer Installation, Create new Instance since this is the first time i use it, Server and Client Tools, and chose a Local rather the Domain option aferwards. (i have used this version before but had to format the comp so now reinstalling everything).
My problem is this, i basically started the server and it on online. i went to the "enterprise manager" and in the "Microsoft SQL Servers -> SQWL Server Group -> (Local)(Windows NT)-> Databases, i created a new database called tables and added a single table just to begin testing to see if at least its functional. i was able to do this so far.
Now i started my .NET, and wrote a tiny program to see if the connection to the SQL database would open, but it didnt. It always failed. i am programming an ASP.NET WebApplication. I cant open the connection to my database. i dont know why. (The tiny piece of code i wrote is at the bottom in case you know c#). There is a note also under the code for the ones who will read through its simlicity
any help or walk through would be appreciated. thank u...
outputBox.Text += "---------------opening the Connection";
}
catch(Exception p)
{
outputBox.Text += "--------------failed to open Connection";
Console.WriteLine(p.ToString());
}
outputBox.Text += "-------------Success Connection and Login to Server!";
}
}
}
NOTE: i always get this output :
Button has been clicked----------------Creating sql Connection--------------failed to open Connection-------------Success Connection and Login to Server!
it skips the try block's print line which means it didnt work......
string connection = ConfigurationSettings.AppSettings["ConnectionString"]; this one i updated in my Web.config and included application setting line that loox like this
<add key="ConnectionString" value="Data Source=127.0.0.1; Initial Catalog=login; User Id=sa; password=pass" />
Hi there...I use SQL server integrated security so when a user opens a database inaccess it prompts the username & password in a small popup box onconnection, but I'd like to use my own customised form for theauthentication process, is this possible? I do know that this login popboxis displayed before any forms are loaded, can it be said that on databaseconenct that the form is opened? How will I transfer the values entered intothe login form to the sql server for authentication?Thanks alot in advanceRudi Groenewald
pls i have asp.net page that i want to connect to sql server express edition database and i want data to be submited from the page into sql server express edition database that i have in my project folder when i click on submit button pls help me with the code to do this
Bear with me plase as I am nto very familiar with the coding world. The project I am working on is giving me troubles. I am trying to set up a form that can be used on line for our sales staff. It is a call activity form that I was hoping to submit to the DB I Have created in SQL. I would like the sales staff to fill out this form and then have their information transferred to the DB so that I can generate reports from that data. The trouble I am having is getting the intial connection to the DB opened up using the submit button on the form. I go into the code behind the page, and I have entered many scripts with no success. I continue to see that I receive erros when I try to use the opening line: Dim cn As New ADODB.Connection
If anyone out there has some sample scripting that would help me with this, I would really appreciate it. Thank you.
Hi I am trying to develop a web based application. I am trying to insert data from my web form into sql server database using stored procedures. I am having a problem while i try to exceute the command. The error given by system is System.InvalidCastException: Object must implement IConvertible. at System.Data.SqlClient.SqlCommand.ExecuteNonQueryany suggestion what am i missing?With Regards,Sameer Jindal
Here is the scenario: We have an existing production non clustered SQL 2000 server instance that we need to migrate to a new clustered SQL 2000 server instance. We need to accomplish this without affecting the FQDN that applications use to call this server. I found this article on a solution to rename the server after an xcopy of the entire db structure. Here is the link http://vyaskn.tripod.com/moving_sql_server.htm. The other issue that we are trying to resolve is the time it takes for the snapshots of replication to run (in our case almost a full day). That is why this approach looked like it may be a good solution for us.
Here is the question: Is it possible to move our existing database to a new clustered environment without having to change the FQDN that other applications use to access this database and without having to reinitialize replication?
My database has mirgrated from Access to a SQL Server. As of now, we use SharePoint for our data entry form and it works great exporting an Excel workbook to my desktop and then import to the SQL Server and drop it in the tables that apply. The management team wants to get rid of SP and have all 110 project owners use a template Excel workbook I created and then anytime they have new projects or changes to existing they use this template and email it to me. The problem is the template has partial text, combox boxes, checkboxes and drop-down boxes. In Access I can spend a couple weeks creating VBA code to import this but not sure how this is done in SQL Server. The 2nd issue is why in the heck would they even want to go this route. This seems to be a coding nightmare, then I have to store all the Excel workbooks somewhere for history sake. It just seems to me that keeping the SP site is much smarter for them and for me. My question is not related to SP because I am going to push to keep that up anyway. I just want to know is it possible for SQL Server to import a workbook that has form functions on it easily or is it a stored procedure coding nightmare?
i have created a vb.net application. i have a database (sql server 2005)with user and password which are salted. I want to use the login form of vb.net to login in to the application.(how to code the comparision string?) the username and password will be put in text boxes.(how to form the connection to the sql database?) how to do the coding for this?? plz help..
Where do I ask questions about creating SQL Server 2005 triggers? I want to create a field in a SQl server 2005 database based on a combination of four (4) fields in one table, and then have the data updated in a field in the same table, as well as output to the asp.net web form.
I've been creating a vb.net 2005 windows form application using Everywhere and it has been going pretty well. However, I haven't had much luck finding any help on how to deploy my Everywhere database file(s) and Everywhere itself. To install redistribute Everywhere, can I just add the the 8 .dlls found in the Everywhere directory into my VS setup project? Also, what database file(s) do I need to deploy in my windows setup?
Hi, I'm new around here and am stumped. I have created a form where I submit the information into a SQL Server 2000 table. When I submit the information through the form, only the first character of each field populates inside of the SQL table. This happens for every field except for two, zip and comments. The zip field is numeric and the comments field is text. All the other fields are varchar fields; and these are the fields with the problems. I have attempted to change the data type to text, but that did not work either. I am doing this through a stored procedure I created. Here is the asp code: Public Class WebForm1 Inherits System.Web.UI.Page Protected WithEvents txtFirstName As System.Web.UI.WebControls.TextBox Protected WithEvents txtLastName As System.Web.UI.WebControls.TextBox Protected WithEvents txtAddress1 As System.Web.UI.WebControls.TextBox Protected WithEvents txtAddress2 As System.Web.UI.WebControls.TextBox Protected WithEvents txtCity As System.Web.UI.WebControls.TextBox Protected WithEvents txtZip As System.Web.UI.WebControls.TextBox Protected WithEvents txtEmail As System.Web.UI.WebControls.TextBox Protected WithEvents txtPhone As System.Web.UI.WebControls.TextBox Protected WithEvents txtComments As System.Web.UI.WebControls.TextBox Protected WithEvents ddlState As System.Web.UI.WebControls.DropDownList Protected WithEvents ddlGift1 As System.Web.UI.WebControls.DropDownList Protected WithEvents ddlGift2 As System.Web.UI.WebControls.DropDownList Protected WithEvents ddlGift3 As System.Web.UI.WebControls.DropDownList Protected WithEvents Form1 As System.Web.UI.HtmlControls.HtmlForm Protected WithEvents SqlConnection1 As System.Data.SqlClient.SqlConnection Protected WithEvents SqlCommand1 As System.Data.SqlClient.SqlCommand Protected WithEvents btnSubmit As System.Web.UI.WebControls.Button #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.SqlConnection1 = New System.Data.SqlClient.SqlConnection() Me.SqlCommand1 = New System.Data.SqlClient.SqlCommand() ' 'SqlConnection1 ' Me.SqlConnection1.ConnectionString = "data source=NDAVENPORT2;initial catalog=Bluestreak;integrated security=SSPI;persi" & _ "st security info=False;workstation id=NDAVENPORT2;packet size=4096" ' 'SqlCommand1 ' Me.SqlCommand1.CommandText = "dbo.[InsertFreeOrders]" Me.SqlCommand1.CommandType = System.Data.CommandType.StoredProcedure Me.SqlCommand1.Connection = Me.SqlConnection1 Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(10, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing)) Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@firstname", System.Data.SqlDbType.VarChar, 50)) Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@lastname", System.Data.SqlDbType.VarChar, 50)) Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@address1", System.Data.SqlDbType.VarChar, 100)) Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@address2", System.Data.SqlDbType.VarChar, 100)) Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@city", System.Data.SqlDbType.VarChar, 50)) Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@state", System.Data.SqlDbType.VarChar, 50)) Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@zip", System.Data.SqlDbType.Decimal, 9, System.Data.ParameterDirection.Input, False, CType(18, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing)) Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@email", System.Data.SqlDbType.VarChar, 50)) Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@phone", System.Data.SqlDbType.VarChar, 50)) Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@item1", System.Data.SqlDbType.VarChar, 50)) Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@item2", System.Data.SqlDbType.VarChar, 50)) Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@item3", System.Data.SqlDbType.VarChar, 50)) Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@comments", System.Data.SqlDbType.VarChar, 2147483647)) End Sub Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here End Sub Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click If IsValid Then SqlCommand1.Parameters("@firstname").Value = txtFirstName.Text SqlCommand1.Parameters("@lastname").Value = txtLastName.Text SqlCommand1.Parameters("@address1").Value = txtAddress1.Text SqlCommand1.Parameters("@address2").Value = txtAddress2.Text SqlCommand1.Parameters("@city").Value = txtCity.Text SqlCommand1.Parameters("@state").Value = ddlState.SelectedItem.Text SqlCommand1.Parameters("@zip").Value = txtZip.Text SqlCommand1.Parameters("@email").Value = txtEmail.Text SqlCommand1.Parameters("@phone").Value = txtPhone.Text SqlCommand1.Parameters("@item1").Value = ddlGift1.SelectedItem.Text SqlCommand1.Parameters("@item2").Value = ddlGift2.SelectedItem.Text SqlCommand1.Parameters("@item3").Value = ddlGift3.SelectedItem.Text SqlCommand1.Parameters("@comments").Value = txtComments.Text SqlConnection1.Open() SqlCommand1.ExecuteNonQuery() SqlConnection1.Close() Response.Redirect("Success.aspx") End If End Sub End ClassMy stored procedure looks like this:CREATE PROCEDURE dbo.InsertFreeOrders ( @firstname varchar( 50 ), @lastname varchar( 50 ), @address1 varchar( 100 ), @address2 varchar( 100 ), @city varchar( 50 ), @state varchar( 50 ), @zip numeric, @email varchar( 50 ), @phone varchar( 50 ), @item1 varchar( 50 ), @item2 varchar( 50 ), @item3 varchar( 50 ), @comments text )ASInsert FreeOrders ( o_first_name, o_last_name, o_address_1, o_address_2, o_city, o_state, o_zip, o_email, o_phone, o_item_1, o_item_2, o_item_3, o_comments ) Values ( @firstname, @lastname, @address1, @address2, @city, @state, @zip, @email, @phone, @item1, @item2, @item3, @comments )GOSo it is working, just not completely and I am stumped here. Any help would be great! Thanks.
I have a database in ACCESS and i want everytime that there is a change made in Access the cude in SQL server to be automatically updated .Is there a way that this can be done with Integration Services?
I just changed my Access 2002 database to a SQL Server ADP project. Ihad a form where the user entered a value into a text box and when acommand button on the form was clicked a Report was opened. The reportsrecord source is a query. The query uses the value from the form textbox to restrict the query.Table name = EggsTableone of the columns in the table is named: EggColorForm name = EggColorFormForm text box name = ColorTextBoxThis sql worked for the query before I converted to SQL:SELECT EggsTable.EggColorFROM EggsTableWHERE (((EggsTable.EggColor)=[Forms]![EggColorForm]![ColorTextBox]));This no longer works. Can I change the syntax somehow to get this towork? I tried dropping the brackets around the word "Forms", I trieddropping all the square brackets, etc., nothing worked.I also tried just opening the report with the report's Server Filterproperty set to:EggColor=N'Forms.EggColorForm.ColorTextBox'I tried using the Report's open event to pass the form value directlyto the report. I tried setting a variable from the text box value onthe form. So far, nothing works. Any ideas?
I am new to MS SQL SERVER 2005. My web application using SQL Server 2005 as back end database to store all the information. I am using connection pooling to get connection form db. But my fron end user( user who logged in into webapplication) lost his identity b'coz for database user is application server. Now I wanna to track front end user in db.
In oracle I can do it by using CLIENT_IDENTIFIER. But in sql server I don't know how to do it.
in oracle i can do it as below public void setIdentity(Connection conn, String identity) { PreparedStatement ps; try { ps = conn.prepareCall("begin dbms_session.set_identifier(?); end;"); ps.setString(1, identity); ps.execute(); ps.close(); } catch (SQLException e) { // Handle the exception } } <!--[if !supportLineBreakNewLine]--> once the transaction is complete, the application should reset the identity as follows:
public void clearIdentity(Connection conn) { PreparedStatement ps; try { ps = conn.prepareCall("begin dbms_session.clear_identifier(); end;"); ps.execute(); ps.close(); } catch (SQLException e) { // Handle the exception } } <!--[if !supportLineBreakNewLine]--> Please guide me for same.
This table is more or less always the same, but from time to time I want to add a new car type, for instance; Car_typeA_5, but this new type must be located under the last register, in the example under ‘Other_Cars_typeC’. So, now the order is wrong, and when I want to display these car types to a web form object, the items will appear wrong ordered.
My question is: To order the values(items) correctly, Where I have to do it? In the web page (ASP.NET) code behind, or somewhere in SQL Server (for example in the Stored Procedure that passes the value to the application)? Or maybe in the same database table..?
i have used CMS in SQL 2008 R2. i have added couple of servers in its group. i have executed a query & i need to send the query output in the form of email.
basically query is checking the rows count from couple of user tables in servers.
issue here is how to copy the data that is used by CMS? i need to work on automate the rows count in difft user table in db servers.
I am trying to run a UNION ALL query in SQL SERVER 2014 on multiple large CSV files - the result of which i want to get into a table in SQL Server. below is the query which works in MSAccess but not on SQL Server 2014:
SELECT * INTO tbl_ALLCOMBINED FROM OPENROWSET ( 'Microsoft.JET.OLEDB.4.0' , 'Text;Database=D:DownloadsCSV;HDR=YES', 'SELECT t.*, (substring(t.[week],3,4))*1 as iYEAR, ''SPAIN'' as [sCOUNTRY], ''EURO'' as [sCHAR],
[Code] ....
What i need is:
1] to create the resultant tbl_ALLCOMBINED table
2] transform this table using PIVOT command with following transformation as shown below:
PAGEFIELD: set on Level = 'Item' COLUMNFIELD: Sale_Week (showing 1 to 52 numbers for columns) ROWFIELD: sCOUNTRY, sCHAR, CATEGORY, MANUFACTURER, BRAND, DESCRIPTION, EAN (in this order) DATAFIELD: 'Sale Value with Innovation'
3] Can the transformed form show columnfields >255 columns i.e. if i want to show all KPI values in datafield?
P.S: the CSV's contain the same number of columns and datatype but the columns are >100, so i dont think it will be feasible to use a stored proc to create a table specifying that number of columns.
4 Layered Web Application for Inserting data into a database using sql server as the back end and a web form as the front end using C# . Can someone provide with code as I am new to this architecture and framework. Better send email. Thanks In Advance, A New Bie