|
The format is <computername>\<instancename> as described on http://msdn.microsoft.com/library/default.asp?url=/library/en-us/instsql/in_runsetup_2xmb.asp
JackDotNet
|
|
|
|
|
Hi Thanx for reply.Actually I have some workflows created using office 2000 on sql server 2000(default instance). Now I want to port this workflows over Office XP developer using sql server (named instance). Here I am using template for parting. While Instantiating the template it gives me follwing error dialog box
---------------------------
DCOM Server modTBAD failure
---------------------------
The wizard is unable to create an application from the template because the DCOM server modTBAD failed to successfully complete the task.
---------------------------
OK
---------------------------
Does Anybody know the problem soln?
VikramS
|
|
|
|
|
Hello...
I have the following situation :
One data set that contains two data tables, tblHeader and tblDetails. The two tables have a column in common (like a relation).
Dim con as New SqlCOnnection()
Dim da as New SqlDataAdapter()
Dim cmd as New SqlCommand("sp_insertrecord", con)
da.InsertCommand = cmd
da.InsertCommand.CommandType = CommandType.StoredProcedure
da.InsertCommand.Parameters.Add(New SqlParameter("@Param1", SqlDbType.VarChar, 40, strCol1))
da.InsertCommand.Parameters.Add(New SqlParameter("@Param2", SqlDbType.VarChar, 3, strCol2))
da.InsertCommand.Parameters.Add(New SqlParameter("@Param3", SqlDbType.VarChar, 10, strCol3))
as U can see strCol1,strCol2 and strCol3 are source columns that map to the columns that i want to update. The problem is that I have col1 in tblHeader and Col2 and Col3 in tblDetails....
when I execute
da.Update(ds,tblDetails.TableName)
I get an error stating the sp_InsertRecords expects paramter @Param1 that was not supplied.
I guess that the situation is happening because I have one row in the header table and 3 rows in the details table...
How can I map the paramter to the correct column name in the second table??..how should i modify my da.update statement???
what I need is a sort of an INNER JOIN in ADO.NET..is there such a thing??
Please Help Me
Thanks In Advance
|
|
|
|
|
Hi guys
I wonder if it is possible to select some range of rows from a teble. For example suppose that I want to retrieve 12th-24th records from a table which has 100 records. Is it possible? If so, what is the SQL query?
abcdabcdabcdabcda
Don't forget, that's Persian Gulf not Arabian gulf!
Murphy: Click Here![^] I'm thirsty like sun, more landless than wind...
|
|
|
|
|
You should use TOP keyword in combination of ORDER BY, something like this:
SELECT TOP 12 FROM table ORDER BY primaykey DESC WHERE primarykey < 24
Maybe this statement doesn't work, but you should find it with TOP keyword.
Mazy
"Man is different from animals in that he speculates, a high risk activity." - Edward Hoagland
|
|
|
|
|
I want to do that independent of primary key.
abcdabcdabcdabcda
Don't forget, that's Persian Gulf not Arabian gulf!
Murphy: Click Here![^] I'm thirsty like sun, more landless than wind...
|
|
|
|
|
yes but 12th - 24th based on what sort criteria?
just change the order by criteria in mazzy's example and it will work
"there is no spoon" biz stuff about me
|
|
|
|
|
m a y s a m wrote:
I want to do that independent of primary key.
Do you eat food with your legs?
Mazy
"Man is different from animals in that he speculates, a high risk activity." - Edward Hoagland
|
|
|
|
|
There is no way around it, m a y s a m
You have to deside what you want ...
JackDotNet
|
|
|
|
|
I have dragged a query from an access database onto a web form, configured the oledbadapter to point to the correct connection, generated a dataset out of that, and in the properties box of the datagrid I have set its datasource and other properties. If I do a preview of the dataset and fill it, it shows the data.
However, when I view in browser the datagrid does not even show up.
I have not used any behind code in this as far as binding the dataset to the datagrid, etc. b/c I am thinking that it was already set when I changed the property settings for that datagrid.... Am I correct in thinking this? If so, does anyone know why my datagrid will not show up?
Thanks
"Nothing is at last sacred, but the integrity of your own mind."
"What lies behind us and what lies before us are nothing compared to what lies within us." - Ralph Waldo Emerson
|
|
|
|
|
cavall wrote:
I have not used any behind code in this as far as binding the dataset to the datagrid, etc.
Have you add mydataadapter.Fill(dataset); in your code-behind?
Mazy
"Man is different from animals in that he speculates, a high risk activity." - Edward Hoagland
|
|
|
|
|
Hi,
I'm doing ASP.NET application.
What is the type of the SqlParameter.Value to call a stored procedure expecting a nvarchar parameter?
I tried to simply use a string, but it fails (code compiles, but the stored procedure returns nothing).
I tried also to cast the string to a SqlDbType.Nvarchar, but I didn't manage.
Thanks for help, sorry if I'm not clear ...
Matthieu
|
|
|
|
|
String should work. What does the stored proc look like?
|
|
|
|
|
Hi,
The procedure:
ALTER PROCEDURE matthieu77.GetUserByName ( @Nom nvarchar )
AS
SELECT UserID, Nom
FROM Users
WHERE Nom=@Nom
RETURN
The code that calls this proc:
SqlParameter param = new SqlParameter ("@Nom",SqlDbType.NVarChar);
param.Direction=ParameterDirection.Input;
param.Value="Bonjour";
SqlDataAdapter ad = new SqlDataAdapter();
ad.SelectCommand = new SqlCommand();
ad.SelectCommand.Connection = sqlConnection1;
ad.SelectCommand.CommandText = "GetUserByName";
ad.SelectCommand.CommandType =CommandType.StoredProcedure;
ad.SelectCommand.Parameters.Add(param);
ad.Fill(dataSet11,"Users");
DataGrid1.DataBind();
If I replace in the stored procedure Nom='Bonjour' it works fine.
Regards,
Matthieu
|
|
|
|
|
I am trying to access and pull data into a datagrid from a MS Access database located on a network drive. Everytime I try and run the project I get this error:
The Microsoft Jet database engine cannot open the file '\\Jxn-nt-tmsus\e\LISTEST\e214.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
I know there is no one else in the file and i have rights to access the file.
Any suggestions?
THanks very much
"Nothing is at last sacred, but the integrity of your own mind."
"What lies behind us and what lies before us are nothing compared to what lies within us." - Ralph Waldo Emerson
|
|
|
|
|
If you're talking about ASP.NET, make sure the YourMachineName\ASPNET user account has read/modify permissions on the folder containing the .mdb file.
Marcie
http://www.codeproject.com
|
|
|
|
|
Marcie,
I copied the database to my local machine and I can access the data fine.
As soon as I try to access it on the remote location... I get the error.
I do not see a user account on the Intranet domain for ASPNET... does there need to be one on that level or do I need to make sure that just myMachine/ASPNET user account can read/modify that remote folder..
Thanks!!
"Nothing is at last sacred, but the integrity of your own mind."
"What lies behind us and what lies before us are nothing compared to what lies within us." - Ralph Waldo Emerson
|
|
|
|
|
The EVERYONE account has Full Control access to the folder and file... wouldnt that include any ASPNET account that could possibly be in there?
Thanks
"Nothing is at last sacred, but the integrity of your own mind."
"What lies behind us and what lies before us are nothing compared to what lies within us." - Ralph Waldo Emerson
|
|
|
|
|
I'm doing some test with sql connection polling using sqlconnection object.
I've read some articles stating that the Dispose method of the connection removes the connection from the pool, but in my tests the Dispose doesn't remove it from the pool (I'm checking the audit logout event in the SQL Trace). The audit logout only happens when I close the application.
My question is... does the dispose method remove the connection from the pool or not !?
|
|
|
|
|
|
I'm using the connection timeout parameter of the connection string. The problem is that its not respecting the parameter i'm passing.
Ex.: Data Source=DummyInexistantServer;Initial Catalog=Zombo; Integrated Security=SSPI;Connection Timeout=5;
Since the server doesn't exists it should return an error in 5 seconds (according to the connect timeout paramtere). The fact is... its taking about 30 seconds to throw me the error.
any ideas ?
Mauricio Ritter - Brazil
Sonorking now: 100.13560 MRitter
English is not my native language so, if you find any spelling erros in my posts, please let me know.
|
|
|
|
|
when i execute my stored procedure in asp.net...i had this server error 'Exception Details: System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.'
wat does this error message mean and how can i retify it. for info this is my stored procedure... how can my codes be amended to solve this prob..or is it my codes in my aspx.vb tat is the cause of the prob??
CREATE proc spAddRegCust(@custName varchar(50), @custTitle varchar(5), @custGender varchar(6), @custICNo varchar(9),
@custDOB datetime, @resiAdd varchar(50), @custPhone varchar(8), @custEMail varchar(50),
@billAdd varchar(50), @deliAdd varchar(50), @custLoginID varchar(10), @custPwd varchar(10), @custConfirmPwd varchar(10),
@custJoinDate datetime)
AS
IF @custName is NULL
BEGIN
RETURN -201
END
if EXISTS (SELECT custLoginID FROM Customers Where custName=@custName)
BEGIN
RETURN -200
END
insert into Customers(custName, custTitle, custGender, custICNo,custDOB,resiAdd,custPhone,custEMail,
billAdd, deliAdd, custLoginID, custPwd, custConfirmPwd,custJoinDate)
values(@custName,@custTitle, @custGender, @custICNo, @custDOB, @resiAdd, @custPhone, @custEMail,
@billAdd, @deliAdd, @custLoginID, @custPwd, @custConfirmPwd,@custJoinDate)
return
GO
|
|
|
|
|
It's not the SQL that is causing your error. Check the String.Format that you are using, you probably don't have the numer of params correct, or are trying to access more that you have.
String.Format("{0}{1}", param1);<br />
String.Format("{2}", param1);<br />
These will cause the error.
|
|
|
|
|
Hi There,
I used odbc Driver for .Net to Read Records from .dbf Data file, everything is fine but some fields I have problem retrieving the data with simple select statment. Even SQL Server 2000 can not import those feilds. The only way for me to see the data is to use dbf viewer which can not help me with my project.
The data type is Numeric, Size:6, Dec:3 (from the dbf viewer)
and the Data has a decimal point ex. 13.060 or 4.080
any body had thes
Mabb
|
|
|
|
|
maybe read it as a text value and convert it in the app
"there is no spoon" biz stuff about me
|
|
|
|