BCP -- Insert Record Error (SQL2005-Window 2003)

Aug 21, 2006

Hi All,

When we to inset record into the tables through BCP we are getting following errors.

C:> bcp ACCT.dbo.dtpro out C: estdtpro_TA.dat -T-n
C:>bcp ACCT.dbo.Semiaa out C: estSemiaa_TA.dat -T -n

BCP out works fine only BCP in have problems.

Please can you let me know how to resolved this problem.

===========
Exp - 1
===========

C:> bcp ACCT.dbo.dtpro in C: estdtpro_TA.dat -T-n

Starting copy...
SQLState = HY000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unexpected EOF encountered in BCP data-file

0 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.) Total : 1

===========
Exp - 2
===========

C:>bcp ACCT.dbo.Semiaa in C: estSemiaa_TA.dat -T -n

Starting copy...
SQLState = HY000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unexpected EOF encountered in BCP data-file

0 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.) Total : 1

============
Exp-3
============

C:>bcp ACCT.dbo.SemiH in C: estSemiH_TA.dat -T -n

Starting copy...SQLState = HY000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unexpected EOF encountered in BCP data-file
SQLState = 42000, NativeError = 7339
Error = [Microsoft][SQL Native Client][SQL Server]OLE DB provider 'STREAM' for l
inked server '(null)' returned invalid data for column '[!BulkInsert].Created'.


BCP copy in failed




Thanks in Advance






View 12 Replies


ADVERTISEMENT

Insert Record Triggerred Ms_sqlce_se_notify_wndproc Window From Spy++

Jan 11, 2008

Hi Guys,
I got a wired problem when using sqlce 3.1 on XP SP2.
I am using SQLCE in a windows service product, when i called pICommentText->Excute(...) to insert record, the return code is S_OK, but at the same time, a window named ms_sqlce_se_notify_wndproc was triggered as well, the window was not shown on task bar, but it can be found by Spy++. Does anybody has any idea about it? Because our product is running as windows service, any exposed window would be regarded as serious security hole.

Thanks a lot!

View 2 Replies View Related

Sql2005 Sp2 64 Bit Surface Area Error When Rying To Access It Locally On Op Sys 2003 R Sp2 64bit

Mar 18, 2008

I get this problem when tryoing to connect to the surface area configuration for services & connections
As well as for features.
However I can connect via another computer and change the options accordingly but I just can't do it locally from the server ?
Does any one know why please, the links in the message don't help ?

===================================
An exception occurred in SMO while trying to manage a service. (Microsoft.SqlServer.Smo)
------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.InnerWmiException&LinkId=20476
------------------------------
Program Location:
at Microsoft.SqlServer.Management.Smo.Wmi.WMIProxy.ExecProcess(Object request)
at Microsoft.SqlServer.Management.Smo.Wmi.WMIProxy.ProcessRequest(Request req)
at Microsoft.SqlServer.Management.Smo.Wmi.WmiSmoObject.EnumChildren(String childTypeName, WmiCollectionBase coll)
at Microsoft.SqlServer.Management.Smo.Wmi.ServiceCollection.InitializeChildCollection()
at Microsoft.SqlServer.Management.Smo.Wmi.ServiceCollection.get_Count()
at Microsoft.SqlSac.MainPanel.FormFeatures..ctor(String machineName, Form callingForm)
===================================
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
------------------------------
Program Location:
at Microsoft.SqlServer.Management.Smo.Enumerator.Process(Object connectionInfo, Request request)
at Microsoft.SqlServer.Management.Smo.Wmi.WMIProxy.ExecProcess(Object request)
===================================
------------------------------
Program Location:
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext()
at Microsoft.SqlServer.Management.Smo.Wmi.WmiBase.BuildDataTable(ManagementObjectCollection listManagementObject)
at Microsoft.SqlServer.Management.Smo.Wmi.WmiBase.BuildResult(ManagementObjectCollection listManagementObject)
at Microsoft.SqlServer.Management.Smo.Wmi.WmiBase.GetData(EnumResult erParent)
at Microsoft.SqlServer.Management.Smo.Environment.GetData()
at Microsoft.SqlServer.Management.Smo.Environment.GetData(Request req, Object ci)
at Microsoft.SqlServer.Management.Smo.Enumerator.GetData(Object connectionInfo, Request request)
at Microsoft.SqlServer.Management.Smo.Enumerator.Process(Object connectionInfo, Request request)

Hmm A tad strange.

View 3 Replies View Related

SQL 2005 - Window 2003 With IIS Server

Sep 11, 2006

Dear ALl,

We have SQL 2005 running on Window 2003.

Our Dev team created a web application. Which user we need to add in the database and what permission we need to assign him. So web application can do read, write and modify in the database tables.


Database name = ACCT
IIS server name = MASS     (running on different machine win 2003)

What role following accounts play in the connection of iis to database server login.

1: ASP.NET
2: MASSii$1  & massiis1

If
<indentitt impersonate = TRUE  or False> in the config file..


 

Thanks in advance.

 

 

 

View 1 Replies View Related

Any Issues Installing SQL2000 SP4 On Window 2003 SP2 Server?

Nov 14, 2007

I was told that SQL2000 SP4 needs to install prior to installing SP2 for windows 2003 server. Is that true? What issues I will encounter if the installation is done the other way around?
Thanks for any insights

View 3 Replies View Related

ASP: Error When Trying To Insert Record

Jul 6, 2007

I receive the following error when trying to INSERT INTO; am using Access db.



Microsoft OLE DB Provider for ODBC Drivers error '80040e07'[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.


The code is as follows:



<%
Dim dbConn
set dbConn = server.CreateObject("adodb.connection")
dbConn.open("connect")
dbConn.Execute("INSERT INTO tbl_country (region, countryName, population, country_currency, description, imageURL, imageALT) VALUES ('" & Request.Form("region") & "', '" & Request.Form("countryName") & "', '" & Request.Form("population") & "', '" & Request.Form("country_currency") & "', '" & Request.Form("description") & "', '" & Request.Form("imageURL") & "', '" & Request.Form("imageALT") & "'),")
Response.Redirect("admin_master.asp")
%>



I would greatly appreciate any help you can give me.

View 7 Replies View Related

Deploying App To 2003 Server With SQL2005

Feb 19, 2007

I devloped this app with vs2005 and SQL 2005 express, everything seems to work fine, when I deploied the app to my web server I got a few different error messages that I worked through but now stuck on this one. i am sure it is something with SQL 2005 server. is there anywhere that has a good check list for doing things right in asp and SQL deployment?
here is the error message i am getting from debugging.
The SELECT permission was denied on the object 'Categories', database 'Blog', schema 'dbo'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: The SELECT permission was denied on the object 'Categories', database 'Blog', schema 'dbo'.
Source Error:
Line 33:             SqlConnection connection = CreateConnection();Line 34:             SqlCommand command = CreateCommand(connection, query, parameters);Line 35:             SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);Line 36: Line 37:             Type datatype = factory.GetDataType(); 
Source File: c:InetpublogplankroadApp_CodeUtilitiesSqlDatabase.cs    Line: 35

View 1 Replies View Related

Server 2003 Sql2005 Iis6

Jan 30, 2008

Have Server2003 Enterprise running IIS6 and sql2005. Lease is up and have to migrate to new server. Any migration tools out there to make this easier? Saw one for exchange, 2000-2003, but not one to do the server2003-server2003 and/or IISy-IIS6 and SQL2005-SQL2005. Any pointers for assistance?


thanks,
Janet

View 6 Replies View Related

Access 2003 Projects Don't Work With SQL2005

Apr 25, 2008



Hi All,

Just installed a new version of SQL2005 on a brand new Application Server.

However, when i fired up Access 2003, it gives me some chaos about how Access isn't compatible with SQL2005. Fantastic lack of backward compatibility straight out the box.

Ok, so I do as it says and download all the updates.

Try again... Still won't allow me.

Wen't to Control Panel > Data Sources and confirmed the Native Client is in there. Added a System DSN for the new Server.

Tried Access again, still not working?? What the...

Why can't I create a new project in Access 2003, and edit it from my desktop instead of sitting on the server for every table modification? I hate designing tables on the SQL studio.

Any clues or help would be great. I'm just disappointed at the moment, on how this is holding up my database projects.

Thanks,

Chris.

View 1 Replies View Related

Unable To Install SQL2005 I64 On A 2003 SP1 Itanium

Sep 29, 2006

Hello,

I have many problem when I try to install SQL 2005 Ets edition ia64 on a 2003 ets Itanium edition.

When I launch the setup, all is all right. But during the installation, it tryes to start MSSQL services.

The staring of this service failed. So I try to start the service mannually. Nothing.

Error messages I can get (in the event log) :

Source : Service Control Manager ; ID : 7000

Description :Service SQL Server (MSSQLSERVER) failed to start due to the following error: The service did not respond to the start or control request in a timely fashion.

Source : MsiInstaller ; ID 10005

Description : Product: Microsoft SQL Server 2005 (64 bits) -- Error 29503. Failure of the starting of service SQL Server. For more information, to see the headings of on line help €śProcedure: to post the files newspapers of installation of SQL Server 2005€? and €śmanual Starting of SQL Server€?. This error is (1053) The service did not respond to the start or control request in a timely fashion.

HELPPPPP PLEEEAAAASSEEEEEE !!!!!!!!!! ;-)

View 7 Replies View Related

Error When Attempting To Insert Record Using Stored Procedure

Jun 21, 2006

I am trying to save user data to a sql table but keep getting the following error;
Unable to cast object of type 'System.Boolean' to type 'System.Data.SqlClient.SqlParameter'.
I am using VWD Express Edition with .NET 2.0 and a SQL 2000 database. The code that generates the error is as follows;
Public Function chkUser(ByVal strUser As String) As Stringdim MyConnection As SqlConnectionDim MyCommand As SqlCommandDim ReturnString As StringDim params As SqlParameterDim SelectCmd As String = "wm_CheckUser"MyConnection = New SqlConnection(myConnectionString)MyCommand = New SqlCommand(SelectCmd, MyConnection)MyCommand.CommandType = CommandType.StoredProcedure
Tryparams = MyCommand.Parameters.Add("@parUser", SqlDbType.VarChar, 100).Value = strUserMyCommand.Connection.Open()MyCommand.ExecuteNonQuery()ReturnString = "Record Exists!"Catch Exp As SqlExceptionReturnString = ReturnError(Exp.Number, "Users", Exp.Message)End TryMyCommand.Connection.Close()Return ReturnString
End Function
Basically, I'm traying to check to see if a user id already exists in the database before saving the data the user entered. If the email address entered by the user is already in the database I want a message to be shown to the user. If the email address does not exist then the data entered by the user is saved and the form goes to step two (2) of the user registration process.
Any help with this would be greately appreciated. I can't seem to see what is wrong here. Please someone help.
Thanks,
Jaime

View 7 Replies View Related

Slow ADO Connection Speed Vista Vs XP To SQL2005 / Server 2003

Jan 31, 2008

I have an application written in VB6 that creates a ADO connection using the (native SQL2005 clien)t from the client to SQLServer 2005 on Server 2003 configured as a stand alone server. The application works great on XP and has for a number of years.

Now I am attempting to deploy in Vista and using the same code the connection speed CRAWLS. it's in the magnitude of atleast 10 times slower. It eventualy works but the selects and doing a readnext against the resulting record set is at a snails pace.

What am I missing. It's has to be some sort of configuration problem somewhere.

View 2 Replies View Related

Open Report In New Window: Window.open Method Gives Error

Jun 26, 2006



Hi,

I am using SSRS Microsoft SQL Server Reporting Services Designers
Version 9.00.1399.00. I want to open linked report in new window.

I tried whats mentioned in http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=240172&SiteID=1 but i get an error on Window.Open method.

How do I solve the problem?

Thanks

View 1 Replies View Related

Sql2005 Database Restore From Another Sql2005 Backup File Error.

Dec 15, 2005

hi

i try to restore a bak file from another sql2005 server to my sql2005 server, but it show the error message as below :

 

 

TITLE: Microsoft SQL Server Management Studio Express
------------------------------

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)

------------------------------
ADDITIONAL INFORMATION:

Cannot open backup device 'C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBackupackup.bak'. Operating system error 5(error not found).
RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3201)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=3201&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------


 

 

 

pls some one can help me ???

 

thanks

chaus

View 62 Replies View Related

Upgrading 32 Bit SQL 2000 SP4 Ent Running On 64 Bit Windows 2003 Enterprise To SQL2005 64 Bit In Place

Sep 14, 2005

Will it be possible to do an in-place upgrade from SQL 2000 Server Enterprise SP4 32 bit running on top of 64 bit Windows 2003 Enterprise , clustered, to SQL 2005 Enterprise 64 bit?
The 32 bit SQL 2000 to 64 bit SQL 2005 in place upgrade seems questionable to me...
Anybody tried anything like this?

View 1 Replies View Related

Reporting Services :: Open URL In SSRS Report In New Window While URLs Keep Changing In Every Record

Jun 29, 2015

I want to be able to open URLs in a new window in my SSRS report, and the URLs keep changing in every record. The problem is these links are not the only things present in the record, and there is other data present. I keep seeing examples where they are considering only a link to be present in the record with no other data.

Also the data in the record includes HTML tags and I checked the option that says "HTML - Interpret HTML tags as styles" on the placeholder properties window.

Example of data in the record:
Hello! Welcome to google, the most used search engine.
Click on www.google.com to go the website

So when I click on the www.google.com URL, it should open in a new window. 

View 2 Replies View Related

Installation Of SQL2005 Enterprise(English Version) Under Different Lanuage Verion Of Windows 2003

May 6, 2008

I found sql2005 Enterprise cannot be installed under Simplied Chinese win 2003, the only thing i suspect is that win2003 is an envaluation copy with netframework 2.0 be installed.

View 1 Replies View Related

How To Resolve An Indefinite Wait State On Update Command In SQL2005 (64bit 2003 Server)?

Jun 16, 2006

I am in the process of moving a SQL2000 database to a SQL2005 database.

Porting from: SQL200, Windows Server 2000(SP4) (32 bit dual processor)
to:SQL2005, Windows Server 2003(SP1) (x64 bit dual processor)


After porting the database from SQL2000 to SQL2005 (no changes) running the same update statement from Management Studio on the 2003 Server and and Query analiser on the 2000 Server.

SQL2000 completes the command in 2 minutes SQL2005 is still running after 60 minutes.

SQL2000 is the live/production system with users connected, the SQL2005 is in a test environment with no other processors running.

When the problem first showed up the SQL2005 activity monitor displayed CXPACKET wait type on 2 processes with the same pid number. I now no longer have any wait type being displayed but my wait time is increasing rapidly. No block is reported.

I assume that I have an CXPACKET lock problem.

Am I correct that I have a CXPACKET problem and if so what is the resolution?

The update statement is as follows...

update BI_LENDING_TRANSACTIONS
set [Balance Movement Month] = M.[Balance Movement Month]
from BI_LENDING_TRANSACTIONS as T,
BI_BALANCE_MOVEMENT_DATES as M,
BI_COMPANIES as C
where (T.[Transaction Date] >=
(SELECT DATEADD(d, - 70, minDate) from (select min([Transaction Date]) minDate
from p_BI_LENDING_TRANSACTIONS) t1)
OR
T.[Transaction Date] >= C.[MostRecentSnapShotDate] or
T.[Value Date] = T.[Balance Movement Month] ) and
T.[Value Date] <= C.[MostRecentSnapShotDate] and
T.[Value Date] >= T.[Transaction Date] and
T.[Company_Code] = M.[Company_Code] and
T.[Value Date] > M.[SnapShotFromDate] and
T.[Value Date] <= M.[SnapShotToDate] and
C.[Company_Code] = M.[Company_Code]



View 1 Replies View Related

TOUGH INSERT: Copy Sale Record/Line Items For Duplicate Record

Jul 20, 2005

I have a client who needs to copy an existing sale. The problem isthe Sale is made up of three tables: Sale, SaleEquipment, SaleParts.Each sale can have multiple pieces of equipment with correspondingparts, or parts without equipment. My problem in copying is when I goto copy the parts, how do I get the NEW sale equipment ids updatedcorrectly on their corresponding parts?I can provide more information if necessary.Thank you!!Maria

View 6 Replies View Related

How To Create An Copy Of A Certain Record Except One Specific Column That Must Be Different &&amp; Insert The New Record In The Table

Sep 1, 2006

Hi
I have a table with a user column and other columns. User column id the primary key.

I want to create a copy of the record where the user="user1" and insert that copy in the same table in a new created record. But I want the new record to have a value of "user2" in the user column instead of "user1" since it's a primary key

Thanks.

View 6 Replies View Related

Lookup &&amp; Update Record &&amp; Insert Record

Mar 26, 2008

Hi All,

I am trying to create package something like that..

1- New Customer table as OleDB source component
2- Lookup component - checks customer id with Dimension_Customer table
3- And if same customer exist : I have to update couple fields on Dimension_Customer table
4- if it does not exist then I have insert those records to Dimension_Customer table

I am able to move error output from lookup to Dimension_Customer table using oledb destination
but How can I update the existing ones?
I have tried to use oledb command but somehow it didnt work
my sql was like this : update Dimension_Customer set per_X='Y', per_Y= &Opt(it should come from lookup)

I will be appreciated if you can help me...

View 3 Replies View Related

Sqlcommand And Visual Studio Net 2003 Code To Update A Record With A Click Of Button.

Sep 1, 2006

Hello to everyone,  I have this problem If I use this code when I try to update a record in my sql database It does not do anything. This is the code.  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click        Dim myconn As New SqlConnection("Data Source=.;Initial Catalog=SistemaIntegral; user id=sa")        Dim mycmd As New SqlCommand("presup", myconn)        mycmd.CommandType = CommandType.StoredProceduremycmd.parameters.Add(New SqlParameters("@txtClave", SqlDbtype.int,4)).Value=txtClave.textmycmd.parameters.Add(New SqlParameters("@txtForig", SqlDbtype.varchar,50)).Value=txtFOrig.textmycmd.parameters.Add(New SqlParameters("@txtFmod", SqlDbtype.varchar,50)).Value=txtFmod.textmycmd.parameters.Add(New SqlParameters("@txtFeje", SqlDbtype.varchar,50)).Value=txtFeje.textmycmd.parameters.Add(New SqlParameters("@txtPorig", SqlDbtype.varchar,50)).Value=txtPorig.textmycmd.parameters.Add(New SqlParameters("@txPmod", SqlDbtype.varchar,50)).Value=txtPmod.textmycmd.parameters.Add(New SqlParameters("@txtPeje", SqlDbtype.varchar,50)).Value=txtPeje.text mycmd.parameters.Add(New SqlParameters("@txtClave", SqlDbtype.int,4)).Value=txtClave.text        myconn.Open()        mycmd.ExecuteNonQuery()        myconn.Close()        mycmd.Dispose()        myconn.Dispose()    End Sub  This is the code for the procedure called "presup" in SQL 2000 Server.CREATE PROCEDURE [presup](@txtClave [int],@txtForig [varchar](50),@txtFmod [varchar](50),@txtFeje [varchar](50),@txtPorig [varchar](50),@txtPmod [varchar](50),@txtPeje [varchar](50),@txtIdPresupuesto [int])as Update [Presupuesto]Set [IdClave]=@txtClave,[orig]=@txtForig,[moda]=@txtFmod,[ejer]=@txtFEje,[origr]=@txtPorig,[modar]=@txtPmod,[ejerr]=@txtPejeWhere ([IdPresupuesto]=@txtIdPresupuesto)GO When I click the Update button of my webform it does not do anything. Please Help me I am new to Visual Studio.Net 2003. (2 weeks ago I started using Visual Studio) 

View 1 Replies View Related

Why Does SQL2005 Automatically Insert TOP 100 PERCENT In Views?

Feb 7, 2006

Hi AllI have just upgraded to SQL2005 and found an annoying problem. WheneverI add a new view or amend an existing one (created in SQL 2000Enterprise Manager) it inserts TOP 100 Percent into the SQL query. Evenif I delete the clause from the SQL query it puts it straight back inagain. This is a problem as there are some queries where I just don'twant this clause there (ADO.NET cannot update a view with a TOP clause)Any ideas anyone?Many thanksIan Bell*** Sent via Developersdex http://www.developersdex.com ***

View 3 Replies View Related

InfoPath 2003 - Insert Data In SQLServer??

Jan 9, 2007

Hello,

I created an InfoPath 2003 form, with a datasource from SqlServer 2000. When I try to insert a new record the follow error occurs:

"InfoPath cannot connect to the data source.
Safety settings on this computer prohibit accessing a data source on another domain."

I checked Enabled -"Access data source accross domains" from Security Settings->Miscellaneous, but the error still appears.

Have anyone any idea about this error?

Thanks.




View 1 Replies View Related

None-Domain Server Cannot Access SQL2005 Data On Windows 2003 Domain Server

Sep 26, 2006

I'm trying to run a test from my test environment which is a non-domain Windows 2000 server to access my domain 2003 with SQL2005. I have install 2005 tools to try to access the SQL server.



- I have try following the KB265808 - no success.
- Reading alot of blogs and it seems all are pointing to the same problem. "Remote access" but the settign is enabled.Error Message:

TITLE: Connect to Server
------------------------------

Cannot connect to ardsqldatawh.

------------------------------
ADDITIONAL INFORMATION:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=53&LinkId=20476


Question: Could Windows 2003 security be blocking access? I'm using sa account to access.

Also, sa account does not seems to work for remote access. It is ok when accessing locally.

Any help would be appreciated.
949jc

View 1 Replies View Related

Cannot Find Server Or DNS Error When Using JAVASCRIPT Window.open With DNS Alias

Oct 15, 2007

Using SQL Server 2000 Reporting Services and want to open new IE window to link to a site.
We are using IE 6.0.

I am using the following Navigation "Jump to URL" in report:
javascript:void(window.open('http://www.microsoft.com/en/us/default.aspx'))

This works as expected if I am not using the DNS alias to reference Reporting Services. But if I use the DNS alias when referencing Reporting Services, then when I click the link in the report I get the "Cannot find server or DNS Error" in the IE window that opens. Everything else works correctly in the reports when I use the DNS alias.

Anyone have a clue why this is happening?

Thanks, DR

View 3 Replies View Related

How To Connect To Sql Server As Other's Window Login Rather Than User's Window Login Thorugh ASP.NET.

Dec 14, 2006

Dear members,

In MSDN, it says that it is recommended to use windows authentication to connect to SQL Server rather than use mixed authentication.

I create user deltasqluser on windows OS, and I specify in my webform ASP.NET script below :

protected System.Web.UI.WebControls.Label Label1;
private string _connString = @"data source=deltasql2000;initial catalog=northwind;integrated security=false;user id=deltasqluser";
/*
comment : I login to my windows as deltakoronx, and I want to every user (including me), connected to sql server through IIS, will be identified as deltasqluser not as user's login (impersonate)
*/
private void Page_Load(object sender, System.EventArgs e)
{
SqlConnection conn = new SqlConnection(_connString);
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandType = CommandType.Text;
cmd.CommandText = "select suser_sname()";

conn.Open();


string userName = cmd.ExecuteScalar() as string;
conn.Close();
conn.Close();
Label1.Text = userName;
}


at web.config, I add :
<identity impersonate="false" userName="deltasqluser" password="" />


at IIS webApplication1's properties, tab "Directory Security", at "Authentication and access control" section, I checked "enable anonymous access" with user : DELTAIUSR_DELTA and checked "Integrated Windows Authentication",


at query analyzer, I login as "sa" and execute script below :
exec sp_grantdbaccess 'deltasqluser','northwind'


when I run the ASP.NET script, error at conn.Open(); with error message :
Login failed for user 'NT AUTHORITYNETWORK SERVICE'.


What should I do so that IIS login to SQL Server as user deltasqluser not as "NT AUTHORITYNETWORK SERVICE" ?

Regards,

Koronx

View 1 Replies View Related

INSERT New Record Help

Feb 24, 2006

Ok this is a simple question but i cant seem to find out how since i had the access of a query builder for web matrix.I have the following:A Table called Customer, with Cust_Name, Cust_phoneI have modified my CreateUserWizard to accomodate mroe text boxes which would finally store to vales for  Cust_Name, Cust_phone.Question is how can i perform an INSERT query? or rather i noticed that the query builder doesnt allow me to, instead the query  builder is towards inserting new records thur GridView and FormView.I've designed a query to handle wildcards i.e  @Cust_Nameso i'm thinking if i can have a working insert statment i can do something liketbCust_name.txt = @Cust_Namethen finally perform the insert queryAny ideas? thanks

View 2 Replies View Related

Insert A New Record

Dec 29, 2006

Hi,

I would like to know is it possible to combine these 2 statements into 1, as I want to insert a single record set in tblRefLockers.

statement 1:

INSERT INTO tblRefLockers (Locker_No)

SELECT Locker_No from tblLockersInfo

WHERE MemberNo = 1234

statment 2:

UPDATE tblRefLockers

SET Locker_Condition = 'BAD'

WHERE MemberNo = 1234

Can I do that?

Thanks,

KNVB

View 6 Replies View Related

Sql2005 Exp Sp2 Install Error

Mar 19, 2007

Hi All

I cannot complete the sql2k5 express update to sp2. I get the error no 1635. This patch package could not be opened. Verify that the patch package exists... etc. The log file states the following.

Trying source \DLc$5f3f0e35b9c57ea30accad3e6b66585fHotFixSqlSupportFiles.

Why is it looking here for the install when the patch files are located in c: empsp2 ??

What can i try

View 3 Replies View Related

Error Installing SQL2005 SP2

May 23, 2007

I'm trying to install SP2 for SQL 2005 on Win 2003 sp1. Right now 2005 is installed as a named instance with a 2000 instance running on the same box.

I get this in the log files:

<Func Name='LaunchFunction'>
Function=Do_sqlPerfmon2
<Func Name='GetCAContext'>
<EndFunc Name='GetCAContext' Return='T' GetLastError='0'>
Doing Action: Do_sqlPerfmon2
PerfTime Start: Do_sqlPerfmon2 : Wed May 23 10:09:03 2007
<Func Name='Do_sqlPerfmon2'>
Error copying file(C:Program FilesMicrosoft SQL Server90DTSBinnDTSSVCPERF.INI) to file(C:Program FilesMicrosoft SQL Server90DTSBinnperf-DTSSVCPERF.INI). Error code 2
MSI (s) (5C!64) [10:09:03:671]: Transforming table Error.

MSI (s) (5C!64) [10:09:03:688]: Transforming table Error.

MSI (s) (5C!64) [10:09:03:688]: Note: 1: 2262 2: Error 3: -2147287038
Error Code: 1603
MSI (s) (5C!64) [10:09:03:723]: Transforming table Error.

MSI (s) (5C!64) [10:09:03:740]: Transforming table Error.

MSI (s) (5C!64) [10:09:03:740]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (5C!64) [10:09:03:740]: Product: Microsoft SQL Server 2005 Integration Services -- Error 29528. The setup has encountered an unexpected error while Installing performance counters. The error is: The system cannot find the file specified.


Error 29528. The setup has encountered an unexpected error while Installing performance counters. The error is: The system cannot find the file specified.

<EndFunc Name='LaunchFunction' Return='1603' GetLastError='0'>
MSI (s) (5C:38) [10:09:03:757]: User policy value 'DisableRollback' is 0
MSI (s) (5C:38) [10:09:03:757]: Machine policy value 'DisableRollback' is 0
Action ended 10:09:03: InstallFinalize. Return value 3.

View 3 Replies View Related

Exception - Insert Record Into DB

Aug 4, 2007

 Hello I’m using express edition to create my trail test
application. Below is the code that I have and I’m trying to insert data to the
database table named “Coin�.







Protected Sub
btnSave_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnview.Click



       
Dim s As
String = txtCname.Text

       
'Dim myConnection As New
SqlConnection(myConnString)

       
Dim desc As
String = txtCDesc.Text

       
Dim ConStr As
New SqlClient.SqlConnection

       
ConStr.ConnectionString = "server=testsqlinstance;
Integrated Security=True"

       
Response.Write("Connection string:  " & ConStr.ConnectionString)





       
Try

           
Dim SelectQuery As
String = "SELECT
max(coinid) from coin"

           
Dim idval As
Integer = 0

           
Dim command As
New SqlCommand(SelectQuery, ConStr)

           
ConStr.Open()

           
idval = command.ExecuteScalar()

           
Console.WriteLine(idval)

           
idval = idval + 1

           
Dim InsertQuery As
String = "INSERT
INTO COIN(coinname, coinid, ebayid, ebaymember, ebaymemid , amount , coindesc)
VALUES('1992-Proof'," & idval & ",'eewerwer','sp6937','serwryana',67.70,'Matt
Proff of 1992- Mint Set')"

           
Dim command1 As
New SqlCommand(InsertQuery, ConStr)

           
command1.ExecuteScalar()

           
Dim S1 As
String = "Record
insert - Successful!"

           
Console.WriteLine(S1)

 

       
Catch ex As
Exception

            Label2.Text = ex.ToString

       
Finally

           
ConStr.Close()

       
End Try

End Sub





 This program is
throwing an exception (mentioned below) 

Exception --->  System.Data.SqlClient.SqlException:
Invalid object name 'coin'. at
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean
breakConnection) at
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception,
Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj) at
System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at
System.Data.SqlClient.SqlDataReader.get_MetaData() at
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds,
RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior,
RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult
result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at
System.Data.SqlClient.SqlCommand.ExecuteScalar() at _Default.btnview_Click(Object
sender, EventArgs e) in C:Documents and SettingsarshaMy DocumentsVisual
Studio 2005WebSitesWebSite1Default.aspx.vb:line 92



“Coin� is the table name – which is in SQL server. Kindly
help me to handle and overcome this exception.



Thanks

 

 

View 2 Replies View Related

Insert New Record - Primary Key

Jan 12, 2008

Hi
I have a table in sql server with a numeric field as Primary Key. When i insert a new record i need that primary key increments automatic (like access  auto increment) because i want avoid the possibility of duplicate Primary Keys.
Is that possible?
Thank you

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved