Trouble Opening A Record In CRM
Feb 8, 2007
Hi all,
I have created an SQL Server Report with a table of data on Invoices. Each invoice should be clickable so that it will open in CRM. From the documentation I have read online, it seems like I need to create a report parameter called CRM_URL and add this in the Action property of the appropriate table cell:
=IIF(IsNothing(Parameters!CRM_URL.Value), Nothing, Parameters!CRM_URL.Value & "?ID={" & Fields!invoiceid.Value.ToString() & "}&OTC=1090")
When I do that, I get an error message saying:An attempt was made to set a report parameter 'ID' that is not defined in this report. (rsUnknownReportParameter)
This happens both if I select a particular Invoice ID or simply hard code a known entry from the database. The OTC code is correct.
Any suggestions as to where I might be going wrong?
Regards,
Tim
View 2 Replies
ADVERTISEMENT
Apr 4, 2006
I'm developing an intranet site in ASP.NET 2.0 but I can't seem to connect to the DB from within my code. I've created a .vb class that houses a private Connection() that other functions within the class can call to connect to the database. In the calling function, I've declared my connection object and called the "Open" method on the object. However, when I attempt to execute the stored procedure command by calling the "ExecuteScalar" method, I get the following error:
"ExecuteScalar requires an open and available Connection. The connection's current state is closed."
Here's the code from my class:
Imports System.Data
Imports System.Data.SqlClient
Namespace Encompass
Public Class EncompassSecurity
Public Shared Function GetHRIDByNTUserID(ByVal strNTUserID) As String
Dim strHRID As String
'Create command object
Dim cmd As New SqlCommand("usp_Get_HRID_By_NTUserID", Connection())
cmd.CommandType = CommandType.StoredProcedure
'Open DB connection
Dim DBConnection As SqlConnection = Connection()
DBConnection.Open()
'Input parameters
Dim inNTUserParam As New SqlParameter("@NT_UserID", SqlDbType.VarChar)
inNTUserParam.Direction = ParameterDirection.Input
inNTUserParam.Value = strNTUserID
cmd.Parameters.Add(inNTUserParam)
'Output parameters
Dim outHRIDParam As New SqlParameter("@HRID", SqlDbType.Int)
outHRIDParam.Direction = ParameterDirection.Output
cmd.Parameters.Add(outHRIDParam)
'Run stored procedure
strHRID = cmd.ExecuteScalar()
Return (strHRID)
'Close DB connection
DBConnection.Close()
End Function
Private Shared Function Connection() As SqlConnection
Dim strConnectionString As String
strConnectionString = ConfigurationManager.ConnectionStrings("Conn").ConnectionString
Return New SqlConnection(strConnectionString)
End Function
End Class
End Namespace
Here's the code from my web.config file:
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
WindowsMicrosoft.NetFrameworkv2.xConfig
-->
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<connectionStrings>
<add name="Conn" connectionString="Data Source=ServerName;Initial Catalog=NPASDV;uid=UserName;password=*******;"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
-->
<roleManager defaultProvider="AspNetWindowsTokenRoleProvider" />
<compilation debug="true" strict="false" explicit="true" />
<pages>
<namespaces>
<clear />
<add namespace="System" />
<add namespace="System.Collections" />
<add namespace="System.Collections.Specialized" />
<add namespace="System.Configuration" />
<add namespace="System.Text" />
<add namespace="System.Text.RegularExpressions" />
<add namespace="System.Web" />
<add namespace="System.Web.Caching" />
<add namespace="System.Web.SessionState" />
<add namespace="System.Web.Security" />
<add namespace="System.Web.Profile" />
<add namespace="System.Web.UI" />
<add namespace="System.Web.UI.WebControls" />
<add namespace="System.Web.UI.WebControls.WebParts" />
<add namespace="System.Web.UI.HtmlControls" />
</namespaces>
</pages>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows" />
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>
</configuration>
What am I doing wrong? Any help would be most appreciated!!
Manuel
View 1 Replies
View Related
Oct 29, 2004
Well here is my connection string, I used these details to succesfully access the server from mySQL gui.
SqlConnection shhfd = new SqlConnection ("Data Source=http://www.mydomain.co.uk; " +
"user id=mteccles; password=mypass; connection timeout=30; "
then... try { shhfd.Open(); blah blah blah.
The exception caught is as follows.
at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) at System.Data.SqlClient.SqlConnection.Open() at WebService1.Service1.HelloWorld() in g:inetpubwwwrootwebservice1service1.asmx.cs:line 120
My guess is that something in the web.config isn't right or maybe the host (webfusion) is strange. Thanks if anyone can help.
View 2 Replies
View Related
Mar 23, 2008
Hi, I have a problem, it is that when I try to update a record in my SQL server database, it is not updated and I recieve no error messages. This is the code behind the update button. The stored procedure is "sqlupdate".
Code Snippet
Dim ListingID As String = Request.QueryString("id").ToString
Dim con As New SqlConnection(ListingConnection)
Dim cmd As New SqlCommand("sqlupdate", con)
cmd.CommandType = CommandType.StoredProcedure
Dim id As SqlParameter = cmd.Parameters.Add("@id", SqlDbType.UniqueIdentifier)
id.Direction = ParameterDirection.Input
id.Value = ListingID
Dim PlaceName As SqlParameter = cmd.Parameters.Add("@PlaceName", SqlDbType.VarChar)
PlaceName.Direction = ParameterDirection.Input
PlaceName.Value = PlaceNameTB.Text
Dim Location As SqlParameter = cmd.Parameters.Add("@Location", SqlDbType.VarChar)
Location.Direction = ParameterDirection.Input
Location.Value = LocationTB.Text
Dim PropertyType As SqlParameter = cmd.Parameters.Add("@PropertyType", SqlDbType.VarChar)
PropertyType.Direction = ParameterDirection.Input
PropertyType.Value = PropertyTypeTB.Text
Dim Description As SqlParameter = cmd.Parameters.Add("@Description", SqlDbType.VarChar)
Description.Direction = ParameterDirection.Input
Description.Value = DescriptionTB.Text
Try
con.Open()
cmd.ExecuteNonQuery()
con.Close()
Catch ex As Exception
End Try
View 3 Replies
View Related
Jun 19, 2007
I am currently working on project where I need to insert, delete and update data from a text file I receive into multiple tables. So the file has multiple recordset types(50 to be exact) and each record has a a code to perform an -Update, Insert, or Delete to the destination table. Also when I receive the records they are not sorted. I need to sort the sets for each destination table and then read the the sorted set sequentially and perform the correct action.
Currently I am importing the record via flatfilesource into one column. I am using a script component here that would consist I guess 50 outputs including the fields needed for each table. The outputs are sorted by sortkey field and when I add the record to the output I perform data type transforms needed for each field(most are strings but I need to convert some dates, numbers ect..).
***is there a better way of accomplishing this?***
(ps. I could use the conditional split and the derive column into the 50 different table but it was giving me errors that were almost forcing me to use a nvarchar type instead of a varchar type during some of the field transformations.)
At this point I would need to read through each of the outputs sequentially and perform the update, insert or delete into the needed table. Would I have to create 50 script components with an ADO.net recordset adapter to update the tables for each of the outputs? I am hoping you can help come up with a better way to accomplish all of this.
Also if I do need to update the tables with the script component could someone point me to an example of how to programmatically accomplish that. Thanks for any help of suggestions that you may provide as I am feeling kind of stuck.
View 4 Replies
View Related
Aug 31, 2007
I get this error when I look at the state of my SQLresults object. Have I coded something wrong?Item = In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user. conn.Open()
Dim strSql As String
strSql = "INSERT INTO contacts (companyId, sourceId, firstName, lastName, middleName, birthday, dateCreated)" _
& "VALUES ('" & companyId & "', '" & sourceId & "', '" & firstName & "', '" & lastName & "', '" & middleName & "', '" & birthday & "', '" & now & "') SELECT @@IDENTITY AS 'contactId'"
Dim objCmd As SqlCommand
objCmd = New SqlCommand(strSql, conn)
Dim aSyncResult As IAsyncResult = objCmd.BeginExecuteReader()
If aSyncResult.AsyncWaitHandle.WaitOne() = True Then
Dim sqlResults As SqlClient.SqlDataReader
sqlResults = objCmd.EndExecuteReader(aSyncResult)
Dim cid As Integer
cid = sqlResults.Item("contactId")
Me.id = cid
conn.Close()
Return cid
Else
Return "failed"
End If
View 3 Replies
View Related
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
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
Apr 6, 2007
Hey all!
Sorry for the less then descriptive post title but I didn't find a better way to describe it. I'm developing an app in the express editions of VB and SQLserver. The application is a task/resource scheduler. The main form will have a datepicker or weekly overview and show all tasks scheduled per day. The problem is, I've got one or more people assigned to tasks and I wonder what's the best way to design this. Personally, I'd go for one Task table, a People table and a table that provides a link between them (several record per task, one for each person assigned linking TaskID and PplID). However, I don't see a nice way of showing this data to the end user, allowing him to edit/add etc on ONE screen.
To fix that the only way I see is just add columns to the Task table for every person with select boxes. This way everything can be done on one simple screen. This obviously does present some future issues.
On top of this, which people are available on a day varies and there should be an option to allow a user to set who is available on a specific day. Which would lead me to my first idea and add another table that would provide this. but then I'm having design issues again for the form.
I'm kinda stuck atm, can anyone shed some light on this. I'm sure there is an elegant way of doing this but I'm failing at finding it.
Thanks in advance,
Johan
View 5 Replies
View Related
Apr 7, 2008
Hi,
We're running a Sage CRM install with a SQL Server 2000 database at the back end. We're using the Sage web services API for updating data and a JDBC connection to retrieve data as it's so much quicker.
If I retrieve a record using the JDBC connection and then try and update the same record through the web services, the query times out as if the record is locked for updates. Has anyone experienced anything similar or know what I'm doing wrong? If I just use DriverManager.getConnection() to establish the connection instead of the datasource, and then continue with the same code I don't get these record locking problems. Please find more details below.
Thanks,
Sarah
The JDBC provider for the datasource is a WebSphere embedded ConnectJDBC for SQL Server DataSource, using an implementation type of 'connection pool datasource'. We are using a container managed J2C authentication alias for logging on.
This is running on a Websphere Application Server v6.1.
Code snippet - getting the record thru JDBC:
DataSource wsDataSource = serviceLocator.getDataSource("jdbc/dsSQLServer");
Connection wsCon = wsDataSource.getConnection();
// wsCon.setAutoCommit(false); //have tried with and without this flag - same results
Statements stmt = wsCon.createStatement();
String sql = "SELECT * FROM Person where personID = 12345";
ResultSet rs = stmt.executeQuery(sql);
if(rs.next()){
System.out.println(rs.getString("lastName"));
}
if (rs != null){
rs.close();
}
if (stmt != null) {
stmt.close();
}
if (wsCon != null) {
wsCon.close();
}
View 1 Replies
View Related
Feb 26, 2008
I am attempting to create a multi-record file (as described in my last thread) and have found the following set of instructions very helpful:
http://vsteamsystemcentral.com/cs21/blogs/steve_fibich/archive/2007/09/25/multi-record-formated-flat-file-with-ssis.aspx
I have been able to create a sample file with two of my record types.
I now need to build on this further, because I have 9 record types in total that need to be extracted to a single flat file.
does anyone have any ideas how I might extend the example above to include more record types or know of another means of achieving this?
Thanks in advance for any help you might be able to provide.
View 3 Replies
View Related
Mar 1, 2006
Hi
Can anyone advise me as to how I can add the date and time to 2 columns in the sql server database for each record that is added. I'd prefer not to use the webform. Can sql server add the date automatically to the row?
thanks
View 6 Replies
View Related
Apr 17, 2014
Is that possible to restrict inserting the record if record already exist in the table.
Scenario: query should be
We are inserting a bulk information of data, it should not insert the row if it already exist in the table. excluding that it should insert the other rows.
View 2 Replies
View Related
Jul 20, 2005
Hi All,I have a table in SQL Server 2000 that contains several million memberids. Some of these member ids are duplicated in the table, and eachrecord is tagged with a 1 or a 2 in [recsrc] to indicate where theycame from.I want to remove all member ids records from the table that have arecsrc of 1 where the same member id also exists in the table with arecsrc of 2.So, if the member id has a recsrc of 1, and no other record exists inthe table with the same member id and a recsrc of 2, I want it leftuntouched.So, in a theortetical dataset of member id and recsrc:0001, 10002, 20001, 20003, 10004, 2I am looking to only delete the first record, because it has a recsrcof 1 and there is another record in the table with the same member idand a recsrc of 2.I'd very much appreciate it if someone could help me achieve this!Much warmth,Murray
View 3 Replies
View Related
Jan 14, 2008
Hi Everyone-
i have a matrix report
and i want to switch the record background color with each record in the value column in that matrix report
e.g 1st record background color is gray and next record background color is white
and then the next record background color is gray ... and so on
can anyone help?
thanx
Maylo
View 8 Replies
View Related
Jan 26, 2007
I’m trying to follow the article http://aspnet.4guysfromrolla.com/articles/031506-1.aspx. It gives a sample to download at the bottom which I did. I’m trying to take a look at the Stored Proc that were created in the PagingData.mdf. The only thing included in the App_Data folder is PagingData.mdf file. How can I open the DB or attach it to my SQL2005 server? There is no .ldf file included in the sample so the attaching is failing.
View 2 Replies
View Related
Sep 8, 2005
I used to use rdo in VB6 and now I'm trying to figure out how to use the SqlDataReader class in VB.NET. I want to use an ODBC data source to specify the connection info. I used to give the rdoConnection object a connect string that looked something like this:"DSN=[data source name];UID=[sql server user];PWD=[pwd]"I don't understand the connect string given in all the examples I've found (nor does it seem to work on my system...)
mySqlConnection = New SqlConnection("server=(local)VSdotNET;Trusted_Connection=yes;database=northwind")Does anyone have any ideas? I'm open to explanations as well as solutions :)Thanks,jdm
View 3 Replies
View Related
Nov 12, 2001
i have a 10 gb database which iam not able to poen through enterprise manager or sql query analyser in sql server 7.0, any solutions?
View 1 Replies
View Related
Aug 20, 2004
Hi,
I got a .dts package via email. But I am not able to open it in my sql server.
Could some one pls help me know, how to open .dts packeges in the designer.
Thanks
Cheriyan.
View 1 Replies
View Related
Apr 2, 2008
All I want to do is open an .mdf file. So I have downloaded and installed SQL Server 2005 Express Edition. I have searched HELP but I see nothing simple. How do I add a file to this server so that I can read the file in Access?
Thank you very much for any help you can give.
David Thomas
View 8 Replies
View Related
Apr 16, 2008
Hi, I have a client who has a current website based on an MS SQL database. I am building a new website that will be in MySQL.
I have never used MSSQL before and the only information that i have been sent by the old web designer is a .bak file (which is the latest back-up of the MS SQL info) and the user name and password for the current on-line databases.
I dont know how to open this .bak file, ideally i would like to get it into MS excel or MS access. I have downloaded
SQL Server Management Studio Express and SQL Server Configuration Manager but i dont know what to do next (and am really confused!)
Can anyone advise me of the steps that i need to take to get the data out of the .bak file?
I would be VERY greateful of any assistance.
Thanks in advance,
Rebecca.
View 10 Replies
View Related
May 14, 2008
Hello Guys,
One of the fields in my report is a web address (i.e. http://www.yahoo.com). Navigation property for this field is "Jump to URL". Users will access the report with a browser, using a "sharepoint-like" application. Default behavior of "Jump to URL" seems to be to open the link in the same window (or tab in IE7). Is there a way to force the link to be open in the new window?? Please let me know if you have any suggestions. Thanks!!
View 5 Replies
View Related
May 18, 2008
Hi,
Im using Sql server 2000. I wanted to know if its possible to open a cursor using an sp instead of an sqlstatement?
Also I know that cursors cant be opened for more than one result sets. This question is based on the assumption that the SP will return only one result set.
If possible please let me know the syntax/reference link.
View 4 Replies
View Related
Jul 14, 2006
Hi
I access a DB by as abvious creating a DB Connection and then sending a querry to it. Finally creating an SQL Command and then exuting it.
But the thng is I am using a static function:
which opens a new connection and returns a data reader based on the querry. i.e
pubblic static SqlConnection OpenConnection()
{
try
{
string connectionString = "Data Source=mm\SQLEXPRESS;Initial Catalog=monsoonDB;Integrated Security=True";
SqlConnection conn = new SqlConnection(connectionString);
conn.Open();
return conn;
}
catch (Exception ex)
{
throw;
}
}
Now I have the execute selectquerry function.....
public static SqlDataReader ExecuteSelectQuerry(string querry)
{
try
{
SqlConnection conn = OpenConnection();
SqlCommand scomm = new SqlCommand(querry, conn);
SqlDataReader sdr = scomm.ExecuteReader();
return sdr;
}
catch (Exception e)
{
return null;
}
}}
now my question is....the instance of conn is limited only to that function only, and not returned outside. Whereas only the SqlDataReader is returned outside. Does that have any abnormal affect on the application. Since my ASP Application is getting locked (not doing anything, nt even post back!) sometimes after a few DB operation.
Arent these connections and instances Managed (auto garabage collection)?? Can memory leaks under such a situation occur.
Please help
Thanks
View 3 Replies
View Related
Jun 26, 2007
I have created my query to do what it needs to do but i'm getting error when i click the button, it says there is an error opening my connectiong....
I.E.
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
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: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.Source Error:
Line 28:
Line 29: //open the connection
Line 30: myConnection.Open();
Line 31:
Line 32: //create a commandSource File: c:Documents and SettingsplanPlanDatabaseBZAvuAdd.aspx.cs Line: 30 Stack Trace:
[SqlException (0x80131904): Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +171
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +199
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2305
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +34
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +606
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +193
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +502
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +429
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +70
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +512
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +89
System.Data.SqlClient.SqlConnection.Open() +160
_Default.insertIntoVU() in c:Documents and SettingsplanPlanDatabaseBZAvuAdd.aspx.cs:30
_Default.addAppButton_Click(Object sender, EventArgs e) in c:Documents and SettingsplanPlanDatabaseBZAvuAdd.aspx.cs:127
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +75
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +98
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4919
therefor is this saying that I have to login before even testing this thing or what??
View 27 Replies
View Related
Jan 17, 2008
Hello,
I put my stored procedure in my class and try to execute it but get this error
1st here is my class
1 public signup_data_entry()
2 {
3 SqlConnection con = new SqlConnection("cellulant_ConnectionString");
4
5
6 SqlCommand command = new SqlCommand("Cellulant_Users_registration", con);
7 command.CommandType = CommandType.StoredProcedure;
8
9 con.open();
10
11 command.Parameters.Add(new SqlParameter("@RegionID", SqlDbType.Int, 0, "RegionID"));
12 command.Parameters.Add(new SqlParameter("@RegionDescription", SqlDbType.NChar, 50, "RegionDescription"));
13
14 command.Parameters[0].Value = 4;
15 command.Parameters[1].Value = "SouthEast";
16
17 int i = command.ExecuteNonQuery();
18
19
20 }
and here is the error message on the testing server. Error line is line 27 below
Source Error:
Line 25: command.CommandType = CommandType.StoredProcedure;
Line 26:
Error >>> Line 27: con.open();
Line 28:
Line 29: command.Parameters.Add(new SqlParameter("@RegionID", SqlDbType.Int, 0, "RegionID"));
Source File: c:inetpubwwwrootcellulant1App_Codesignup_data-entry.cs Line: 27
View 1 Replies
View Related
Mar 16, 2008
Hi most of my code follows the following format in a lot of my pages, my question is; Am i approaching it the right way in terms of performance, sql injection attacks and anything someone more knowledgeable than myself can think off, please feel free to criticise the code. Thank youprotected void Page_Load(object sender, EventArgs e)
{string strID = Request.QueryString["id"];
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["streamConnectionString"].ConnectionString);SqlCommand command = new SqlCommand("stream_EventsByID", conn);
command.CommandType = CommandType.StoredProcedure;command.Parameters.Add("@eventID", SqlDbType.Int).Value = Request.QueryString["id"];
conn.Open();
SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
eventList.DataSource = reader;
eventList.DataBind();
conn.Close();
}
}
View 7 Replies
View Related
Jun 26, 2004
I Have A Problem With Opening A Database With "SQLOLEDB" Provider In Web Application Projects!
The Same Database Opens In Windows Application Projects But When I Try TO Open It (Manually Or During A DataAdapter.Fill Method) In Web APPS I Get An Error Message : "Login failed for user 'NT AUTHORITYNETWORK SERVICE'."
I Use Windows NT Authentication In Connections,
I Have SQL Server 2000 Enterprise Edition (With Default Installation) , Windows .Net Server 2003 Enterprise Edition (IIS 6) , And VS.NET 2003 Enterprise Edition (.Net Framework 1.1)
Can Anyone Tell Me What's Wrong?
View 3 Replies
View Related
Jul 11, 2005
Hi,I am getting this error when i am connecting sql database.Error = "SQL Server does not exist or access denied."Can you please suggest me where i am going wrong.RegardsNaveen
View 2 Replies
View Related
Apr 20, 2006
If Someone could please show me some example VB code where i can open the my Sqlconnection in the Page_Load subroutien... and then close that SqlConnection in the Page_Unload routine. I want to be able to execute Sql command without having to re-open and re-close the connection.
Thanks,
Greg
View 4 Replies
View Related
Apr 30, 2001
When using Enterprise Manager, Right Clicking on any table in the db, selecting OPEN TABLE, and choosing either Return all rows or Return Top... I recieve this error "The query cannot be executed because some files are missing or not registered. Run setup again to make sure the required files are registered."
I am running: SQL Server 7.0 Client with Windows 2000.
I have run setup again and the same thing still happenes. I even uninstalled and reinstalled SQL Server, still the same thing occures.
I first installed SQL Server7.0 on my machine about a month and a half ago and all was fine until two weeks ago, then this started happening. SQL Server was the last thing I have installed on this machine so it cannot be a new install conflict. I can't think of any reason for this to be happening out of the blue like it did.
Does anyone have any insight???
View 2 Replies
View Related
Dec 31, 2002
How would i open up ports on the server? Are they all open or do i have to specify which ones i want open? thanks
View 7 Replies
View Related
Mar 11, 2006
My client has given me a DB file (.MDF) and I need to open it in order to export it to the remote DB.
In Enterprise Manager I go to 'New Database' - create a new DB and click on the 'Data' tab to browse to my clients file. Enterprise Manager recognises the file and everything seems hunky dory. but the resulting DB seems to have no tables.
The DB file is 1600K and has some stored procedures but if I try to export the tables there is nothing. His ASP files refer to tables in the SQL as you would expect.
Am I missing something? it's the weekend so he is not available and I don't want to look tooo stupid!
View 2 Replies
View Related