|
Verify that the event handler has been registered.
You can either :
1) set a break point in the addressDataBindingNavigatorSaveItem_Click_1 method and make sure the method is being called
2) or, look at the properties of the save button in the designer window under events. Make sure the click event has the method name as the property value.
If you try #1 and the break point isn't hit, you'll need to try #2.
|
|
|
|
|
Hi
I have check both the point. They are fine. I have tried dubugging it to make sure the on click is called & it is. It goes through the update method fine but for some reason just dosent save it
I am still learning
|
|
|
|
|
Hi, did anyone found the way how to do bulk insert on Sql Mobile 2005? MS announced bcp as a part of SqlMobile2005 but i did not find bcp.exe and SQL command like BULK INSERT are not supported ;(
|
|
|
|
|
Hello All
I need to create a SQL Query of follwing but this not work
can anyone help me to give actual query is has been work
my SQL Query is ---
select * from t_ItemPriceMaster Group BY c_DateForm Having ( ( max( c_DateForm )and c_SoftDelete='1')";
thanks for your time
|
|
|
|
|
Everything you are selecting must be in either aggregate function and/or in GROUP BY clause
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
jaganil wrote: my SQL Query is ---
select * from t_ItemPriceMaster Group BY c_DateForm Having ( ( max( c_DateForm )and c_SoftDelete='1')";
You have an extra "(" in the query
|
|
|
|
|
Hi Friends,
I am Vijayakumar, I imported one excel file into Ms-sql it is around 2MB. After imported it's grew upto 20 MB. We didn't do any modification in MS-sql. Can anybody please help me in this regard how it grew automatically.
With regards,
Vijay
|
|
|
|
|
What's expanded? The excel file. The size of the database? We need more information before we can give you a definitive answer.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I have used the SQL Server Management Studio Express to set the default database and log file locations to C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data. I then use this string to try to create a database "If Not Exists(Select * From sys.databases Where Name ='DB001') CREATE DATABASE BD001 ON PRIMARY (NAME = DB001, FILENAME = 'DB001.mdf', SIZE = 2MB, MAXSIZE = 2GB, FILEGROWTH = 10%) LOG ON (NAME = DB001_Log, FILENAME = 'DB001.ldf', SIZE = 1MB, MAXSIZE = 5MB, FILEGROWTH = 10%)". However, I get the following exception: "CREATE DATABASE failed. Some file names listed could not be created. Check related errors." If I specify the entire path in the create string, then I can create the database without any problems. The problem I have is that when I deploy the application, I won't know the actual database path. I was under the impression that if I set the default database and log file locations using SQL Server Management Studio Express, then I don't need to specify the path in my create database string. Any help or explanation would be appreciated, thanks.
|
|
|
|
|
Hi All,
I want to write a script/tool which would update the schema of the existing database (in SQL Server 2005)
i.e Add/drop a table, column, constraint etc. on a ongoing basis.
The input to my tool would be the latest_schema script which creates the database with all the latest tables, columns, constraints etc.
So the tool that I am going to write should perform a schema-diff with my db Vs the script provided and add/drop the tables, cols, constraints on my database.
I have a couple of solutions in my mind but feel that they are not very efficient.
1. Create a new database running the provided script, write a stored procedure to loop thro all the tables to figure out the diff between the existing db and the current db and update the current db: Problem here is my current db has data and lots of constraints, which might pose a problem.
2. Use some third party tools to generate the sync script and execute it against my current db but I am not sure about the free tools available out there.
Can somebody please provide me some guidelines/tips on how to go ahead about this.
Thanks in advance.
PJ
|
|
|
|
|
hi,
where dataset tables stored ?
|
|
|
|
|
wrote: where dataset tables stored ?
Do you mean how do I get to the DataTables in a dataset? If so, DataSet exposes a Tables collection:
DataSet ds = GetDatasetFromDb();
if (ds != null && ds.Tables.Count > 0)
{
foreach (DataRow row in ds.Tables[0])
{
}
}
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi
I would like to use a C# windows application to determine the layout of a MS Access database. What I am trying to do is to specify an Access database by using an OpenFileDialog and then I want to retrieve a list of all the tables in the database. This will then populate a ComboBox. When a table name is selected in the ComboBox it must go and retrieve the data in the database and display it in a ListView. Displaying it is not a problem, but at the moment I hardcode the table name and when I want to look at another database with a different structure, I need to first find out what the table names are before I can retrieve the data.
Is there a way to dynamically get the database table names?
Thanks
Kobus
|
|
|
|
|
You could try something like
SELECT MSysObjects.Name<br />
FROM MSysObjects<br />
WHERE (((MSysObjects.Name) Not Like "MSys*") AND ((MSysObjects.Type)=1));<br />
Hope this helps out.
"That's no moon, it's a space station." - Obi-wan Kenobi
|
|
|
|
|
I use:
<br />
foreach <br />
( <br />
System.Data.DataRow dr <br />
in <br />
((System.Data.OleDb.OleDbConnection) this.dbc ).GetOleDbSchemaTable<br />
(<br />
System.Data.OleDb.OleDbSchemaGuid.Tables<br />
,<br />
new object[] { null , null , null , "TABLE" }<br />
).Rows <br />
)<br />
|
|
|
|
|
Hi,
as the title says it, I've a question about deploying such assemblies to the MSSQL Server (2005). I know that you can deploy it in Visual Studio, but I wondered if there isn't any other way to deploy them WITHOUT Visual Studio ? That would be very neat. Theoretically there must be some possibilities to do this. Maybe someone has experience with it and can give me some hints
|
|
|
|
|
You would normally use the command:
CREATE ASSEMBLY MyAssembly FROM 'c:\dev\MyAssembly.dll'
WITH PERMISSION_SET = SAFE
Obviously, this would need to be run using sqlcmd or SQL Server Management Studio.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
thank you that was helpful. But maybe I'm to stupid but it doesn't work correct for me. If I execute this e.g. in sqlcmd then I see the deployed assembly, but I don't see the Stored Procedures in my database (as I said I just see the deployed assembly).
I tried this with a new clean database, but on my sql server I already have another database with the same assembly (and stored procedures). Could this be the reason that I don't see the Stored Procs in my first mentioned database ? (I think I heard time ago something like, that all Stored Procs are saved globally in the sql server)
|
|
|
|
|
That's because the command I showed before is used to make the assembly available to SQL Server. What you need to do is to create the stored procedure that references this. Here is an example of a stored function:
CREATE FUNCTION MyFunction(@Name NVARCHAR(30))
RETURNS INT
AS EXTERNAL NAME [MyAssembly].[MyDll.ClassName].[MyMethod]
I hope that this helps.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Mh yes it helps again But I think that I am somehow to stupid... I get always an error saying, that the return types of the t-sql- and clr-types aren't equal. I tried it e.g. this way:
create function MyStoredProc(@name nvarchar(30)) RETURNS uniqueidentifier as external name [MyAssembly].[MyClass].[MyStoredProc]
In my c#-code I see that the implemented storedprocedure MyStoredProc has an output parameter with type of SqlGuid (which is a uniqueidentifier (I think)).
I have also another stored procedure that hasn't any output parameter, but which return value should I specify there ? NULL doesn't work
|
|
|
|
|
FreeCastle wrote: Mh yes it helps again But I think that I am somehow to stupid...
Don't think like that. These are all legitimate questions and they don't reflect on you at all.
FreeCastle wrote: In my c#-code I see that the implemented storedprocedure MyStoredProc has an output parameter with type of SqlGuid (which is a uniqueidentifier (I think)).
I have also another stored procedure that hasn't any output parameter, but which return value should I specify there ? NULL doesn't work
It's hard to say what's going on without seeing your code. If you want to email me it then feel free and I will take a look at it.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
did you receive my email ?
|
|
|
|
|
Hi Guy's
I want to Create a trigger on 'Table1' by which at the time of insertion the same data will be insert in to another table 'Table2' of same database please help me.
Sasmi
|
|
|
|
|
Try this:
CREATE TRIGGER [InsertIntoTable2] ON [Table1]
FOR INSERT
AS
INSERT INTO Table2
SELECT (Field1, Field2, (and so on)) FROM INSERTED
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
Problem: Get all records from MyTable where mydate value is equal to ‘12/31/2006’. Note: Disregard TimeStamp
I know the solution in T-SQL but in PL-SQL i'm just a newbie.
Can you please help me to convert the below T-SQL comannd to PL-SQL.
---TSQL Solution 1: Use 24hrs timespan
SELECT * FROM MyTable
WHERE MyDate BETWEEN '12/31/2006 12:00:00.000 AM' AND '12/31/2006 12:59:59.999 PM'
---TSQL Solution 2: REMOVE TimeStamp
SELECT * FROM MyTable
WHERE RTRIM(CONVERT(VARCHAR(11),MyDate,101)) = ‘12/31/2006’
Thanks,
|
|
|
|