Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Monday, March 26, 2012

Reg questions!!

Hello all,
I am doing my project for my university, The project is about making a registration in the university for students and also for tutors, I want for help on this question:
how could I translate the fact that a student have registered for many courses, I mean how could I make this implemented using MS Access?
Any suggestion, even if it is not related to this question.
Thanks for supporting.

Suggestion: Go to an MS Access forum.

sql

Friday, March 23, 2012

Refresh problem in Crystal Viewer control

Dear Guru's
I am using Crystal viewer control in my VC++ application project. Here i am facing report refresh problem. If i call viewer control Refresh method directly the application is crashing. I am calling that inside OnPaint( ) .

The problem is the report data is not displaying first time the user has to click refresh button.

Please help me how to use "Refresh " method.

Thanks
arunNot sure if this will help, but make sure 'Save Data with Report' is NOT checked. Otherwise, have you tried calling Refresh as soon as the report is displayed (instead of waiting for the user to do it)?|||I am trying to refresh the report through code only using Viewer control 'Refresh' method.
If report displayed with blank then how user came to know that he has to refresh the report by clicking refresh button.

Reformed access user needs advise for future

Hi
I have a vba/vb/access background but I have finally seen the light and have
decided to take up my next project with sql server backend (vb.net front).
So here is
my question;
What are the recommended db development guidelines to achieve both a) a good
user experience of being able to scroll to any record using record
navigation buttons and b) the db efficiency requirement of not loading too
many records in dataset at one time. If there is such a strategy to which
many agree then there should be a sample code app somewhere. It would help
me enormously to see the guts of an actual well written db app - no matter
how trivial as long as it covers the necessary detail - instead of advise
like don't do this or that without the coding specifics.
So here is a chance for the worthy to lead a recent convert (albeit
reluctant due to self deficiency on sql server side).
Thanks
Regards
For the database side, see http://www.aspfaq.com/2120
Unfortunately, I wrote the article long before .NET came about, so you won't
get any client app coding specifics, but it should still be helpful.
If you have the opportunity for additional learning curve, I recommend
learning C# as opposed to VB.Net...
"John" <John@.nospam.infovis.co.uk> wrote in message
news:eGUQVFeaIHA.4684@.TK2MSFTNGP06.phx.gbl...
> Hi
> I have a vba/vb/access background but I have finally seen the light and
> have decided to take up my next project with sql server backend (vb.net
> front). So here is
> my question;
> What are the recommended db development guidelines to achieve both a) a
> good
> user experience of being able to scroll to any record using record
> navigation buttons and b) the db efficiency requirement of not loading too
> many records in dataset at one time. If there is such a strategy to which
> many agree then there should be a sample code app somewhere. It would help
> me enormously to see the guts of an actual well written db app - no matter
> how trivial as long as it covers the necessary detail - instead of advise
> like don't do this or that without the coding specifics.
> So here is a chance for the worthy to lead a recent convert (albeit
> reluctant due to self deficiency on sql server side).
> Thanks
> Regards
>
>
|||As a person who used ASP\VBScript\VBA and had a comfort zone myself I agree
with Aaron. Adopting C# now is the smartest thing you can do now that you're
starting to see that the light can burn even brighter.
Give us a break because we're tired of explaining why over and over. Just
get out of that comfort zone and do it now while you're in transition and
trying to learn OOP.
As for your questions I can briefly say searching the web always works for
me when I have broad open ended questions...
"John" <John@.nospam.infovis.co.uk> wrote in message
news:eGUQVFeaIHA.4684@.TK2MSFTNGP06.phx.gbl...
> Hi
> I have a vba/vb/access background but I have finally seen the light and
> have decided to take up my next project with sql server backend (vb.net
> front). So here is
> my question;
> What are the recommended db development guidelines to achieve both a) a
> good
> user experience of being able to scroll to any record using record
> navigation buttons and b) the db efficiency requirement of not loading too
> many records in dataset at one time. If there is such a strategy to which
> many agree then there should be a sample code app somewhere. It would help
> me enormously to see the guts of an actual well written db app - no matter
> how trivial as long as it covers the necessary detail - instead of advise
> like don't do this or that without the coding specifics.
> So here is a chance for the worthy to lead a recent convert (albeit
> reluctant due to self deficiency on sql server side).
> Thanks
> Regards
>
>

Reformed access user needs advise for future

Hi
I have a vba/vb/access background but I have finally seen the light and have
decided to take up my next project with sql server backend (vb.net front).
So here is
my question;
What are the recommended db development guidelines to achieve both a) a good
user experience of being able to scroll to any record using record
navigation buttons and b) the db efficiency requirement of not loading too
many records in dataset at one time. If there is such a strategy to which
many agree then there should be a sample code app somewhere. It would help
me enormously to see the guts of an actual well written db app - no matter
how trivial as long as it covers the necessary detail - instead of advise
like don't do this or that without the coding specifics.
So here is a chance for the worthy to lead a recent convert (albeit
reluctant due to self deficiency on sql server side).
Thanks
RegardsFor the database side, see http://www.aspfaq.com/2120
Unfortunately, I wrote the article long before .NET came about, so you won't
get any client app coding specifics, but it should still be helpful.
If you have the opportunity for additional learning curve, I recommend
learning C# as opposed to VB.Net...
"John" <John@.nospam.infovis.co.uk> wrote in message
news:eGUQVFeaIHA.4684@.TK2MSFTNGP06.phx.gbl...
> Hi
> I have a vba/vb/access background but I have finally seen the light and
> have decided to take up my next project with sql server backend (vb.net
> front). So here is
> my question;
> What are the recommended db development guidelines to achieve both a) a
> good
> user experience of being able to scroll to any record using record
> navigation buttons and b) the db efficiency requirement of not loading too
> many records in dataset at one time. If there is such a strategy to which
> many agree then there should be a sample code app somewhere. It would help
> me enormously to see the guts of an actual well written db app - no matter
> how trivial as long as it covers the necessary detail - instead of advise
> like don't do this or that without the coding specifics.
> So here is a chance for the worthy to lead a recent convert (albeit
> reluctant due to self deficiency on sql server side).
> Thanks
> Regards
>
>|||As a person who used ASP\VBScript\VBA and had a comfort zone myself I agree
with Aaron. Adopting C# now is the smartest thing you can do now that you're
starting to see that the light can burn even brighter.
Give us a break because we're tired of explaining why over and over. Just
get out of that comfort zone and do it now while you're in transition and
trying to learn OOP.
As for your questions I can briefly say searching the web always works for
me when I have broad open ended questions...
"John" <John@.nospam.infovis.co.uk> wrote in message
news:eGUQVFeaIHA.4684@.TK2MSFTNGP06.phx.gbl...
> Hi
> I have a vba/vb/access background but I have finally seen the light and
> have decided to take up my next project with sql server backend (vb.net
> front). So here is
> my question;
> What are the recommended db development guidelines to achieve both a) a
> good
> user experience of being able to scroll to any record using record
> navigation buttons and b) the db efficiency requirement of not loading too
> many records in dataset at one time. If there is such a strategy to which
> many agree then there should be a sample code app somewhere. It would help
> me enormously to see the guts of an actual well written db app - no matter
> how trivial as long as it covers the necessary detail - instead of advise
> like don't do this or that without the coding specifics.
> So here is a chance for the worthy to lead a recent convert (albeit
> reluctant due to self deficiency on sql server side).
> Thanks
> Regards
>
>

Wednesday, March 21, 2012

Referring to Sql connection string in web.config from code behind

Every time I move my project from my computer to the testing server I have to change the connection string references in the aspx side and in my code behind.

For the code behind I declared the SqlConnection string at the top of the code-behind page for both connection strings and comment out the one not in use. Obviously I then comment out the string not in use in the WebConfig as well.

Being superlatively lazy I always look for the easiest and quickest way to do most anything - connection strings included. Having to comment out strings twice brought rise to the question of whether I can refer to the connection string in the web.config file from the code-behind page. I'm sure it can be done, and I did a good amount of hunting around, but I couldn't find any examples of code that would do that.

Currently, as I said above, I have two connection strings declared at the top of my code-behind. Here's an example of one:

Private sqlConnAs New SqlConnection("Data Source=DATABASESERVER;Initial Catalog=DATABASE;User ID=USER;Password=PASSWORD")

Then, I just use sqlConn as usual in my binding without having to "dim" it in every sub:

sdaPersonnel =New SqlDataAdapter(strSqlPersonnel, sqlConn)

Then there's the SqlConnections set up by the wizard on the aspx side:

<asp:SqlDataSource ID="sqlDataSourcePayrollCompany" Runat="Server" ConnectionString="<%$ ConnectionStrings:DATABASECONNECTIONSTRING%>" ...>

And for the connection in the web.config:

<add name="DATABASECONNECTIONSTRING" connectionString="Data Source=DATABASESERVER;Initial Catalog=DATABASE;User ID=USER;Password=PASSWORD" providerName="System.Data.SqlClient" />

So, what would be the code in the code-behind page to refer to the connection string in the web.config file?

Thanks!

To refer to the connection string via code: ConfigurationManager.ConnectionStrings["<ConnectionStringName>"]|||

Hey, Stiletto, Thanks! That did the trick (or, at least, it got me on the right track). I wasn't exaclty sure how to actually add that to my connection string code, so I had to do some hunting and trying different syntax, but ended up with this working:

Private sqlConnAs New SqlConnection(ConfigurationManager.ConnectionStrings("DATABASECONNECTIONSTRING").ConnectionString)
Thanks again!

Referential Integrity

We are currently using Erwin for our Data Modeler, but wanted to know if
there are any good tools, or better data modelers, to help with our project
of referential integrity. Currently we use triggers to enforce our
referential integrity, but we would like to move towards using constraints to
enforce our data integrity. Currently using SQL Server 2000.SQL Server has a basic data modeler (diagrams) that allows you to create
foreign keys between tables. It is not as nice or powerful as Erwin, but it
gets the job done (and it is free).
If you want to stick with Microsoft products you could try using Visio. I
remember seeing database diagramming capabilities in some of the versions.
I haven't looked at the new Visual Studio offering, but they might have
something in there:
http://msdn.microsoft.com/vstudio/teamsystem/products/dbpro/default.aspx
Here are a few other tools that I am aware of:
WinSQL
http://synametrics.com/SynametricsWebApp/WinSQL.jsp
SQL Diagrams
http://www.skilledsoftware.com/sqldiagrams.htm
--
Keith Kratochvil
"Patrick" <Patrick@.discussions.microsoft.com> wrote in message
news:059856C5-B1EE-481D-A301-A93D62E11EAD@.microsoft.com...
> We are currently using Erwin for our Data Modeler, but wanted to know if
> there are any good tools, or better data modelers, to help with our
> project
> of referential integrity. Currently we use triggers to enforce our
> referential integrity, but we would like to move towards using constraints
> to
> enforce our data integrity. Currently using SQL Server 2000.

Tuesday, March 20, 2012

Referencing SQLDMO in UNSAFE assembly

I created a SQL Server Project in VS 2005, and tried to add a reference to SQLDMO Object dll. But the reference --> add reference, does not allow it. It does not work, even if I set the Assembly Permission Level to UNAFE/EXTERNAL ACCESS.

Reason I'm trying to do this:

We have a SQL 2000 stored procedure that uses SQLDMO using sp_OACreate to BCP files to database. We are converting to 2005 and because of SOX restrictions, I'm trying to replace the sp_OACreate part with external stored procedure written in C#.

According to BOL, I thought atleast UNSAFE should support this, but it seems not.

Probably, I'm expecting too much..

Your help is greatly appreciated.

Thanks

Thanks to Vineet Rao's posting to one of of the answers on this forum, to a similar problem.

I registered "signed" InterOp.SQLDMO.dll (which is obtained by referecing to a regular project) , as UNSAFE, and it appeared in the Reference section of SQL Server Project.

Thanks

Baskar

Monday, March 12, 2012

References other assembly with error...

I have a vb.net project which compiled to CommonLibrary.dll with no error
when I add references CommonLibrary.dll on my reporting project,
it will show an error(as following) when I compile the reporting project
Error message:
"\TestReport.rdl Error while loading code module: â'CommonLibrary,
Version=1.0.1825.16800, Culture=neutral, PublicKeyToken=nullâ'. Details: ?"
Am I missing something or do something wrong'
Thx, pls helptry adding the dll again to the report by going to report properties and
selecting the dll again. this could be because the report is referencing an
old version of the dll.|||See URL: http://blogs.sqlxml.org/bryantlikes/articles/824.aspx
(thanks Bryant)
It is said that you must copy compiled dll to the folder:
C:\Program Files\Microsoft SQL Server\80\Tools\Report Designer
"Louie" wrote:
> I have a vb.net project which compiled to CommonLibrary.dll with no error
> when I add references CommonLibrary.dll on my reporting project,
> it will show an error(as following) when I compile the reporting project
> Error message:
> "\TestReport.rdl Error while loading code module: â'CommonLibrary,
> Version=1.0.1825.16800, Culture=neutral, PublicKeyToken=nullâ'. Details: ?"
> Am I missing something or do something wrong'
> Thx, pls help

References in SQL Server Projects


Hi,

I'm using Visual Studio Beta 1 with SQL Server 2005 Beta 2 and have created a SQL Server Project.

The first thing I tried was to add a reference to a C# class library project that contains many C# tools I like.

Bad news, I get the following error message:

"A reference to 'csharplibrary' could not be added. SQL Server projects can reference only other SQL Server projects."

My question is: is this behavior a limitation of any of the Betas, or is it going to stay? This greatly limits the use of the CLR in SQL Server, IMO.

Martin

Hi,

There are various different approaches you can follow to get your scenario working.
1. You can pre-register all the assemblies that you want to refer in your project - inside your SQL Server database using the CREATE ASSEMBLY statement. Once you are done with that, you can refer them in Visual Studio SQL Server projects using the add reference (they should be shown in the list).
2. You can use class library projects (that allows you to reference any assemblies on the disk) to build your assembly and then register them via SQL Server Management Studio using the CREATE ASSEMBLY statement.

The behavior that you are seeing is going to stay as-is in Visual Studio 2005.

Thanks,
-Vineet.|||
Vineet, thanks for that precious information. It's working... almost.

The assembly is registered, but I get the following error when trying to reference it in Visual Studio for the SQL Server project:
A reference to 'classlibrary' could not be added. This is not a valid assembly or COM component. Only assemblies with extension 'dll' or 'manifest' or COM components can be referenced. Please make sure that the file is accessible, and that it is a valid assembly or COM component.
I've used the same assembly in other VS projects and it's working fine. It's a very basic C# class library/dll with one class containing one static method (no static field).

Any suggestions?

Martin|||

Hi Martin,

This is a known bug and has been fixed in Visual Studio 2005 feb CTP onwards.

Thanks,
-Vineet.

Reference report outside of current project

Hi, I am migrating across some reports from 2000 and some of the
reports reference reports outside of the current project when a person
clicks on a value.
In the report designer under Navigation -> Jump to report the report
has the following value
\parentFolder\Report Name
Under 2005, when I try to do this I get the following error
Item names cannot contain the following reserved characters ;?:@.&=+$,
\*<>|"
So, how can I navigate to a report outside the current folder/
project?
Thanks for any help
MarkusOn May 1, 8:52 pm, Markus...@.gmail.com wrote:
> Hi, I am migrating across some reports from 2000 and some of the
> reports reference reports outside of the current project when a person
> clicks on a value.
> In the report designer under Navigation -> Jump to report the report
> has the following value
> \parentFolder\Report Name
> Under 2005, when I try to do this I get the following error
> Item names cannot contain the following reserved characters ;?:@.&=+$,
> \*<>|"
> So, how can I navigate to a report outside the current folder/
> project?
> Thanks for any help
> Markus
You can either add the report to the current project (via right-
clicking the Reports folder in the Solution Explorer and select Add ->
Existing Item) -or- you can access the outside report via Jump to URL
(assuming you have already uploaded it to the Report Server). Hope
this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||On May 2, 12:30 pm, EMartinez <emartinez...@.gmail.com> wrote:
> On May 1, 8:52 pm, Markus...@.gmail.com wrote:
>
>
> > Hi, I am migrating across some reports from 2000 and some of the
> > reports reference reports outside of the current project when a person
> > clicks on a value.
> > In the report designer under Navigation -> Jump to report the report
> > has the following value
> > \parentFolder\Report Name
> > Under 2005, when I try to do this I get the following error
> > Item names cannot contain the following reserved characters ;?:@.&=+$,
> > \*<>|"
> > So, how can I navigate to a report outside the current folder/
> > project?
> > Thanks for any help
> > Markus
> You can either add the report to the current project (via right-
> clicking the Reports folder in the Solution Explorer and select Add ->
> Existing Item) -or- you can access the outside report via Jump to URL
> (assuming you have already uploaded it to the Report Server). Hope
> this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant- Hide quoted text -
> - Show quoted text -
Hi Enrique, I need to pass parameters between the reports so I doubt
that I will be able to use the "Jump to URL"
So, there is no way of climbing up a directory like I did in 2000/
2003?
Thanks
Markus

Saturday, February 25, 2012

Reducing like returned data

I am working on a personal project and am drawing a complete blank
(too much celebrating last night?) on the SQL term that is used to
eliminate multiples of like data when it is returned from the
database.

ie, instead of ...
red
blue
red
green

it would return ...
red
blue
green

Sorry for the trouble and thanks.DISTINCT or GROUP BY will do that for you.

Example:

SELECT DISTINCT colour
FROM ColourTable

--
David Portas
----
Please reply only to the newsgroup
--|||Thanks, David!

On Thu, 1 Jan 2004 23:47:08 -0000, "David Portas"
<REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote:

>DISTINCT or GROUP BY will do that for you.
>Example:
>SELECT DISTINCT colour
> FROM ColourTable
>--
>David Portas
>----
>Please reply only to the newsgroup