CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.microsoft_application_blocks Tags:
Item Type: NewsGroup Date Entered: 11/12/2004 3:07:30 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 0 Views: 19 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
1 Items, 1 Pages 1 |< << Go >> >|
sueii
Asp.Net User
Can't open SQL connection in a windows service11/12/2004 3:07:30 AM

0/0

Hello,
My problem is as follows:

I have built a windows service to run a vb program in a specified time
(says, run in every four hours or so).
The windows service program itself works fine.
The vb program consists of two VB classes in two separated .vb files in
which Class A is a logic codes while Class B is accomodated with stored
procedures and other DB stuff.
When executing a line of code calling the Class B vb files (which is
consisted of calls to use stored procedure link with the SQL Server), the VB
program jumps out itself back to the windows service. It seems like the VB
program skipping execution when dealing with stored procedure.
===================
In Class B,
Dim strConn as String = "Database=abc; server=135; uid=sa; pwd=0000;"
"
"
" (Inside a sub of Class B)
SqlHelper.ExecuteNonQuery(strConn, "sp_DoSomething", _var1)
"
===================
I also tried to use like this:
SqlHelper.ExecuteNonQuery("Database=abc; server=135; uid=sa; pwd=0000;",
"sp_DoSomething", _var1)
to test if that works but still failed (the VB program stops executing the
rest of the codes and jumps back to the window service).

Does anyone know why? and solution?

Thousands thanks!

=============================================
Few more additional words,
1. the vb file of Class B is using sqlhelper to manipulate DB transactions
by importing applicationblock.data.dll.
2. I am not sure whether the helper works with the windows service.
3. How it's failed is that :

a/ Portion of codes in the Class B .vb file
Public Sub TestService( )
Dim dummyLine As String = "This is a dummy line to test if the sub is being
reached in here."
' try to connect with SQL Server thr SqlHelper; assumming value of _var1 is
written into the DB table after executing a stored procedure called
"sp_DoSomething"
SqlHelper.ExecuteNonQuery("Database=abc; server=135; uid=sa; pwd=0000;",
"sp_DoSomething", _var1)
End Sub

b/ in Class A .vb file, the object of Class B is created by NEW with the
name of CurrentObj and which calls to execute TestService like this:
CurrentObj.TestService( )

c/ However, this line of code is not executed and the flow of running in
Class A is stopped as well. The flow jumps back to the windows service and
then it sits still to wait for next time interval to execute the codes again.

100% appreciation and 1000+ > thanks to you!

-suzzimmi

=============================================

Does anyone know can I use stored procedure through Application Blocks to connect to the SQL server in a windows service?
1 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Microsoft Office Access 2003 Inside Out Authors: John Viescas, Pages: 1298, Published: 2003
Learning WCF: Master Windows Communication Foundation and Soa Fundamentals Authors: Michele Leroux Bustamante, Pages: 582, Published: 2007
Mastering Web Development with Microsoft Visual Studio 2005 Authors: John Paul Mueller, Pages: 822, Published: 2005
Microsoft SQL Server 2005 Notification Services Authors: Shyam Pather, Pages: 698, Published: 2006
SQL Server Security: covers SQL Server 2000 and SQL Server 7 security Authors: Chip Andrews, David Litchfield, David (David William) Litchfield, Bill Grindlay, Pages: 352, Published: 2003
Special Edition Using Microsoft Access 2002: Special Edition Authors: Roger Jennings, Pages: 1458, Published: 2001
MCSA/MCSE: Windows Server 2003 Network Security Administration (70-299) Authors: Russ Kaufmann, Bill English, Pages: 608, Published: 2004
Hacking Exposed Windows Server 2003: Windows Server 2003 Authors: Joel Scambray, Stuart McClure, Pages: 628, Published: 2003
Wrox's SQL Server 2005 Express Edition Starter Kit: Express Edition Starter Kit Authors: Rajesh George, Lance Delano, Pages: 353, Published: 2006
Beginning SQL Server 2005 Express Database Applications: With Visual Basic Express and Visual Web Developer Express from Novice to Professional Authors: Rick Dobson, Pages: 596, Published: 2005

Web:
SQLConnection.Open() in a WebService - .NET C# But it can't connect to another server (running SQL Server 2000). The SQLConnection.Open() call results in a long pause, then the error ...
MSDN Windows Communication Foundation WCF Service hosted in IIS ... WCF Service hosted in IIS can't connect to SQL Server. ... (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)" ...
WCF Service/SQL Server Connection issue - PHWinfo So, I seems that stuff hosted in IIS on this Target server can't connect ... error: 40 - Could not open a connection to SQL Server)" ...
Can't open connection to SQL Express running on local domain box. Can't open connection to SQL Express running on local domain box. .... Of particular note is this statement: "If you run the SQL Server service under the ...
Windows 2000 SQL connection - Computing.Net Subject: Windows 2000 SQL connection OS: Windows 2000 Server .... Unable to open the Server service. Server performance data will not be ...
TheMSsForum.com >> Windows Services >> Can't start SQL Server ... I can't get the SQL Server (MSSQLSERVER) service to start on my = ..... Provider , error: 40 - Could not open a connection to SQL Server) ...
sms admin Cannot open SMS console I can't manually open component manager. ... SMS Server OS: Windows 2003 Server Standard Edition (No Service Pack) SQL Server OS: Windows ...
SQL Server SP2 Problems, Slow Open/Save Operations, EFS and ... If the utility can't locate the FSMO and fails with the message ... Microsoft Exchange & Windows Connections event returns to Las Vegas Nov 10 - 13 ...
Enable remote connection to SQL Server 2005 Express | Linglom's Blog To enable both SQL Server and Windows authentication mode on SQL Server and to allow remote connection and SQL Server Browser. This way I can set it up ...
Can't connect to SQL via IIS using Windows auth in IIS ... Can't connect to SQL via IIS using Windows auth in IIS Administrator ... I am attempting to open a SqlConnection from an .aspx page. ...

Videos:
Web Applications and the Ubiquitous Web Google TechTalks February 1, 2006 Dave Raggett Dave Raggett is currently a W3C Fellow from Canon, and W3C Activity Lead for Multimodal Interaction....




Search This Site:










cross page post from master page

problem with asp.net 2.0 and validators...

css & skinning engine

convert.todobule gives an error

ad authentication & role membership w/ server in the dmz

can a javascript source file be imported into a contentpage?

accessing the aspnetdb

anyone know what happened to this?

format scriptmanager error message popup

looking for download authentication module

nothing = error?

createuserwizard sendingemail substitution problem

need help to run the ibuyspy store application

how can i do this? (please help)

developer required to build custom modules for dnn2.1.2 and dnn3

user control

navigation controls vs graphics design (vs 2005 + dreamweaver)

drop down menu in a masterpage

image can not be displayed

evaluation software

forms authentication: where is the cookie stored?

how can i improve calendar functionalities?

tree view control with column sortable and non data checkbox control

multi project solution problems with portal website

problems with authentication using asp.net 2.0

programmatic add a share folder.

appending to membershipusercollection

skin used when in html edit mode

treeview

controls contains attributes?

 
All Times Are GMT