See Related Forum Messages: Follow the Links Below to View Complete Thread
Server Connected, Client Not
Ok, my program is using 2 programs, the server and client, the server side is saying that it is connected, however the client isnt, so im assuming its the client code, heres the code:
Code:
MsgBox "Attempting To Connect To Server..."
WinsockMain.Close
WinsockMain.Connect strDataLoaded(2), strDataLoaded(3)
xTimer = Timer + 1
Do While Timer < xTimer
Loop
If Not WinsockMain.State = 7 Then
MsgBox "Could Not Connect! The Server Could Be Offline Or Busy!"
WinsockMain.Close
GoTo NextNext2
End If
If WinsockMain.State = 7 Then
MsgBox "Connection Successful!"
WinsockMain.SendData strDataLoaded(1)
End If
Heres The Variables:
strDataLoaded(1) = "Filepath Here"
strDataLoaded(2) = "127.0.0.1"
strDataLoaded(3) = "6669"
and on the server side, its using localport 6669 and is accepting the clients connection, i cant figure out y the client is not connecting properly
Object Is Not Connected To Server
I get the following error when I try to run an executable:
Run-time error '-2147220995 (800401fd)':
Automation Error
Object is not connected to server
Anyone any ideas?
Checking To See If I'm Connected To Server
I want my VB application to see if my Winsock control is connected to a server than sendthedata but if it isn't display a message box saying that your not connected.
I know how to do the sending data and displaying the message box. The only problem is the checking to see if the app is connected to the server.
Thanx,
Ben
*** How To Determine Computers Connected To A Server ***
Hi to all!!! i would make an application that displays in a combo or a listbox the name of the workstations connected to a workgroup...
e.g. i have a workgroup called "work" and many clients called client1work / client2work / client3work etc...
i wanna to displays a list of these computers in a combobox or a listbox...
can u help me?
pleaseee
TIA
simons
Search Form Connected To SQL Server
Hi
Nothing really is happening when i click on the search button in my form
THe form has 6 text box, the first 3 text boxes are linked to specific column and the last 3 text boxes the user can search for any information for that table specific.
Everything i search for an ID nothign happens. Can someone please help.
VB Code:
Option Explicit Private rsSearch As ADODB.RecordsetPrivate conSQL As ADODB.Connection Private Sub frmHandsetSearch_Load() LoadTheGrid "SELECT * FROM Handsets"End Sub Private Function GetRecordset(ByVal strSQL1 As String) As ADODB.Recordset Set conSQL = New ADODB.Connection Dim strSQLServer As String Dim strSQLDatabaseToOpen As String Dim strConnectString As String Dim rsRecords As ADODB.Recordset strSQLServer = "sfdaqsql1" strSQLDatabaseToOpen = "techlog_copy" strConnectString = "Provider=sqloledb;" & _ "Integrated Security=SSPI;" & _ "Data Source=" & strSQLServer & ";" & _ "Initial Catalog=" & strSQLDatabaseToOpen & ";" conSQL.CursorLocation = adUseClient conSQL.Open (strConnectString) Set rsSearch = New ADODB.Recordset rsSearch.CursorLocation = adUseClient Set rsSearch = conSQL.Execute(strSQL1) 'rsSearch.Close Set rsSearch.ActiveConnection = Nothing conSQL.Close Set GetRecordset = rsSearchEnd Function Private Sub LoadTheGrid(ByVal strSQL1 As String) Dim rs As ADODB.Recordset Dim iCol As Integer, iRow As Integer Dim fld As ADODB.Field Set rs = GetRecordset(strSQL1) iRow = 0 Me.MSFlexGrid1.Rows = rs.RecordCount Me.MSFlexGrid1.Cols = rs.Fields.Count Do Until rs.EOF iCol = 0 For Each fld In rs.Fields If IsNull(fld.Value) = True Then Me.MSFlexGrid1.TextMatrix(iRow, iCol) = vbNullString Else Me.MSFlexGrid1.TextMatrix(iRow, iCol) = fld.Value End If iCol = iCol + 1 Next fld iRow = iRow + 1 rs.MoveNext Loop ' With Me.MSFlexGrid1' .ColWidth(0) = 3000' .ColWidth(1) = 3000' .ColWidth(2) = 3000' .ColWidth(3) = .Width - 8000'' .Row = 0' .Text = "abcd"' .Col = 1' .Text = "Handset Date"' .Col = 2' .Text = "Telephia_Asset_Number"' .Col = 3' .Text = "ESN"' .Col = 4' .Text = "SIM_ID"' .Col = 5' .Text = "Min"' .Col = 6' .Text = "Phone_Plan"' .Col = 7' .Text = "Phone_Minutes"' .Col = 8' .Text = "Type"' .Col = 9' .Text = "Model"' .Col = 10' .Text = "Carrier"' .Col = 11' .Text = "Unit"' .Col = 12' .Text = "City Activation"' .Col = 13' .Text = "Cost"' .Col = 14' .Text = "Andrew RGA"' .Col = 15' .Text = "DT For Qualification"' .Col = 16' .Text = "DT Qualified"' .Col = 17' .Text = "D Dispatched"' .Col = 18' .Text = "Market"' .Col = 19' .Text = "DT Shipped"' .Col = 20' .Text = "DT Returned"' .Col = 21' .Text = "Date_purchased"' .Col = 22' .Text = "Status"' .Col = 23' .Text = "Type_mobile_test"' .Col = 24' .Text = "PO_number"' .Col = 25' .Text = "Comments"' End WithEnd Sub Private Sub cmdSearch_Click() Dim strSQL1 As String, strWhere As StringstrSQL1 = "SELECT * FROM Handsets" If Text1.Text <> vbNullString Then strWhere = strWhere & " AND [Telephia_Asset_Number_Handset] LIKE '" & Text1.Text & "*'"End IfIf Text2.Text <> vbNullString Then strWhere = strWhere & " AND [ESN] LIKE """ & Text2.Text & "%"""End IfIf Text3.Text <> vbNullString Then strWhere = strWhere & " AND [MIN] LIKE """ & Text3.Text & "%"""End If'If Text4.Text <> vbNullString Then' strWhere = strWhere & " AND [Keyword LIKE """ & Text4.Text & "*"""'End If'If Text5.Text <> vbNullString Then' strWhere = strWhere & " AND [Location In Unit] LIKE """ & Text5.Text & "*"""'End IfIf strWhere <> vbNullString Then strSQL1 = strSQL1 & " WHERE " & Mid$(strWhere, 5)End IfLoadTheGrid (strSQL1)Debug.Print strSQL1End Sub Private Sub frmSearch_Unload(Cancel As Integer)rsSearch.CloseconSQL.CloseSet rsSearch = NothingSet conSQL = NothingEnd Sub
Thanks
Need Example Vb-source That Is Connected To Sql Server 2000
we are developing a desktop application for mutual funds, using VB-Access but the transactions are exceeding over lakhs of entries and that is why the system got slower, so we have decided to upgrade in sql server after 5 yrs, now i don't have any idea for the indexes that was we used in dao (existing) application.
e.g.,
in a dao application
rs.index = "<indexName>"
rs.seet "=", <key-value>
if rs.nomatch=false then
...
...
else
...
...
end if
the above e.g. is faster then the select query for lakhs of records in a table, but to perform such a fast activity i am not getting what to do with sql-server as dao not supported for sql-server.
thanks,
Client Exists But Server Behaves Still Connected
Hi everybody,
I have a problem that I havent figured out the reason behind it yet. When a client connects to my server, and lets say stays connected for an hour or so, the server doesnt realize if the client exits.
But it works when they are connected for respectively small amount of time.
I do not have a ping system to check whether a client is idle or not. Does anybody have any ideas?
How comes a winsock control cant realize that the client is not connected anymore?
EpcH
Check How Many Users That Are Connected To An SQL Server Database
Is there any way from VB code to check how many computers/users that are connected to an database on an SQL server 7.
I have a program that i have developed in VB that works against an SQL server. Now i want to implement an licens check, so if a customer has 5 license the program will only allow 5 simultanious users against the server.
Is there any easier/better way of solving this problem?
Thaks
5000 Computers All Connected To 1 Server Share Using Vb App
Hi, I have created a vb application, and I have 5,000 users using this application all at the same time... Right now I have this application using:
if fso.fileexists(app.path & " est.txt") then 'etc
The application has a timer which runs every 30 seconds, and checks for this file using fso.. Well as you can imagine, it bogs down the server. Normally the files test.txt is not there.. Its only there about 3 times a day.
Is there a better way to check for the existance of this file? Can I have 5,000 computers monitoring the share for a newly created file called test.txt, or will this kill the server?
Thanks
Client Information Connected To Citrix Server
Hello,
How can I get user, client information connected to Citrix server?
User will connect to Citrix Server using Web Interface and Windows Login/Password. Once user logs onto Citrix, he will see a kind of Desktop within a Webpage and that desktop shows Icons to run applications. These applications are already published on Citrix Server.
I have a VB 6.0 application published on Citrix Server and user will run it through the Icon shown within Citrix Desktop. When application runs, it will load on user's Windows machine. From this VB 6.0 app, I want to capture user's machine information (Name, IP Address), which has logged onto Citrix and running the application.
I am able to get Windows login username of the user. But if I use gethostname, it gives me machine info of the Citrix server and not of the user machine who is logged onto Citrix.
Can anyone help?
Thanks,
Hardik
How To Get All Client IP Address Connected To Server(main Computer)?
we have 3 computers at home, we set-up all computers connected to LAN so we
can share files, my computer serves as the main computer, i just want to get all
IP address of the computers connected to main computer(that is my computer) and list them
in combo box or Listview. How to do this using winsock(VB6)?Need your help. thanks.
Edited by - edd_hills on 6/5/2007 9:43:46 PM
Vb Code To Determine Whether Lpt1 Is Connected To A Printer
hi,
would anyone know how to tell through vb whether LPT1 is connected to a printer. I am really after some code that would check the port's connection rather than use the printers object -- the printers object can include a shared printer that is not connected to LPT1 and that is why it's not a good indicationo whether LPT1 is in use.
Any assistance willbe appreciated
Thank you in adavance
Avi
ActiveReport
Good day for evryone
how possible move conection string to active repotrt2 from code vb6?
Thanks.
ActiveReport
hi,,
how to make the active report display now operation,, I mean it does display the whole days operation ,,but I want it to show the operation I`m workin on right now...
the following is the code for displaying the report:
Private Sub report_Click()
ActiveReport1.ado1.Source = "select * from export where datepc=datepc"
ActiveReport1.Show
End Sub
p.s: datepc= date
thank u
ActiveReport
Hi all
I used from Activereport 2.0 for report generation in my Vb 6.0 and Sql Server 2000 application on Arabic Win98(Client) and Win2000(server).
I have a problem when i send a arabic/English string to Activereport :
when i send Arabic string only to Activereport, Activereport print it in RightToLeft Mode.
when i send English string only to Activereport, Activereport print it in LeftToRight Mode.
But When i send arabic/English string to Activereport, Activereport print it in LeftToRight Mode but i want print in RightToLeft Mode.
ActiveReport - Detail / GroupFooter Together
I have a report... the detail group have a column with itens price, groupfooter2 the subtotal of those prices and in the groupfooter1 the total of all itens.
I want that detail, footer1 and footer2 keep always together.
Never the detail will be on page 1 and footer1 and/or footer2 on page 2.
But the page can have one or more detail/footer groups!
How can I do this ?
Tks for atenttion,
ActiveReport - Detail / GroupFooter Together
I have a report... the detail group have a column with itens price, groupfooter2 the subtotal of those prices and in the groupfooter1 the total of all itens.
I want that detail, footer1 and footer2 keep always together.
Never the detail will be on page 1 and footer1 and/or footer2 on page 2.
But the page can have one or more detail/footer groups!
How can I do this ?
Tks for atenttion,
Comparing A Field With A Function In ActiveReport
This is a little complicated to explain but here I go anyway:
On an ActiveReport I have to display an "*" (in FldIndicator) if field24.datavalue (a percentage itself) is greater than my GetFiscalYearPercent function (thanks again Hypetia) or "" if not.
Needless to say I can't seem to get it to work.
Note:
field24.datavalue = field21.datavalue/field20.datavalue
I tried:
------------------------
If Field24.datavalue > GetFiscalYearPercent(Date) then
FldIndicator.datavalue = "*"
Else
FldIndicator.datavalue = ""
End if
-------------------------
Making A Web Report With ActiveReport (1.0) OCX Created With VB6
Hi,
We have some .ocx reports created with VB6 (yeah I know!) and ActiveReports version 1.0 (yeah I double know )
Now a client wants to get those reports over the web.
We don't want to recreate those reports.
Is there a way to call those OCX and show them in ???
thanks
Sebastien Anselmo
Edited by - sanselmo on 5/11/2007 10:46:40 AM
ActiveReport Prints An Additional Blank Page
Hi all,
I have an ActiveReport that should print only 1 page; after I realigned some controls - pulled them up higher - the report prints now a blank page between 2 reports. I tried putting the controls back where they were, the printing issue still there. When I print 2 reports, between the two I have a blank.
I've attached a snapshot of the "details" object's properties.
I have canGrow = false; shouldn't this prevent the report from growing vertically?
Thanks.
Want To Know That Connected With Internet Or Not From A LAN Connected Computer
I have 3 computer which are LAN connected I use Internet. I want to make such a program which can detect that is any of my computers are connected with internet or not. If I am using internet from a LAN connected computer still it can know that is any one of my computer is connected to internet or not. Please help me.
Crystal Report "server Not Yet Connected"
Crytal report 8.5(RDC)
Problem with (Add databaseTo Report)
Platform vc++
Given programatically as
pDatabase->AddOLEDBSource(bstrAccessConnect, table_name);
By fetching the table names of the DB through
OpenSchema (..) method
This shows the all the tables of db in the tree view
But if i save this report MORE THAN ONCE OR TWICE and view it in the crviewer it gives
"SERVER NOT YET CONNECTED"
Is there any othere method for (Add databaseTo Report)
Db is off ms access, oledb,.....
I got only two functions
1)AddADOCommand (table name is not shown)
2)AddOLEDBSource
---------------
I refered to this
Crystal Knowledge Base
which gives the following
"" Note that a report (.rpt) file already stores the physical server/data source name (DSN), and the user id (UID) used to create the report. If these values remain unchanged at runtime, then these parameters are not needed. The values stored in the report file will be used at runtime""
As mentioned above i have connected while creating the report
and saved But still the error occurs
But the error is due to the
pDatabase->AddOLEDBSource(bstrAccessConnect, table_name);
If i pass the above through loop for eg 2 table names
Database error doesn't come
But if the tables are more than 2 or 3
this error occurs
If I open the same rpt in design time after saving once in runtime
And try to saveas this rpt with diff name or same name in design time , AND OPEN IT ,THE SAME ERROR COMES IN THE PREVIEW
Changing VB Access Code To VB SQL Server Code
Hello guys...
I need some serious help with this code. Somebody else wrote the code for the database in access. But now I have transfered the tables to SQL Server and have created a new VB Form.
THE VB CODE IN MS Access is as follows. What do I need to do to it for it to work with the SQL Server using the VB Form. Its a code for one click button.
Private Sub CmdImport_Click()
Dim db As Database
Dim rs As DAO.RecordSet
Dim SQL As String
Dim objxlapp As Excel.Application
Dim fs
Dim myDir As String
Dim myFile As String
Set fs = CreateObject("Scripting.FileSystemObject")
Set db = CurrentDb
If CheckRates = False Then
'CheckFilestoUpdate
SQL = "Select * From tblDBImportStructure where Use = 1"
Set rs = db.OpenRecordset(SQL, dbOpenDynaset)
With rs
.MoveFirst
Do Until .EOF
sPath = LocateFile(.Fields("Title"), .Fields("Type"), .Fields("DefaultPath"))
If sPath <> "False" Then
fs.CopyFile sPath, .Fields("FileDir") & Format(Form_frmMain.txtasofdate, "mmddyy") & ".xls"
sPath = .Fields("FileDir") & Format(Form_frmMain.txtasofdate, "mmddyy") & ".xls"
.Edit
.Fields("FilePath") = sPath
.Update
Else:
MsgBox "You cancled the previous operation"
Exit Sub
End If
.MoveNext
Loop
.Close
End With
'***Update Version Of Excel***
Set objxlapp = New Excel.Application
objxlapp.DisplayAlerts = False
objxlapp.Workbooks.Open (sPath)
objxlapp.ActiveWorkbook.SaveAs (sPath), xlNormal
objxlapp.ActiveWorkbook.Close
objxlapp.DisplayAlerts = True
objxlapp.Quit
Set objxlapp = Nothing
db.Execute "Delete * From tblFailsData"
GetTableInfo
UpdateRates
Beep
MsgBox "Finshed with import."
Exit Sub
End If
MsgBox "Your have not updated the As Of Date, Interest Rate or Spot Rate, Please do so."
End Sub
Porting DAO VB6 Code To ODBC/server Code
Hi all.
I'm guessing the answer to the following question is a no but I'm asking for confirmation more than anything.
I am trying to port a VB6 project based on an Access 97 platform to one which accesses the same database structure on an SQL Server. Has Microsoft developed any tools where you can give the VB project or module and it runs through it changing the relevant calls etc? If you can recommend any references that would be great.
TIA
Source Code Server
hi all...
i want to make a server in my work tht act as a SOURCE code server
it will have a fixed ip
and the team work cooperates with us can access ti using a pass word and a username and have some priviliges on it
how this can be implemented
Server Understanding Code
Hi Plz help me
how would i get my winsock server to detirman a command sent to it like
Attack:Playername
then send a command to the winsock loaded for that players name
Some1 Plz Look At Me Server Code
plz i realy need hlep look at my server code. In the Commands module in the sub AddToUser. when i try to activate AddToUser it says wrong protcal or state for request i realy need help with this.
Running Code On Server
Hi,
I have a DLL on a server that I have been using to connect to an Oracle database. Usually it runs on the server with asp pages.
Is it possible to write some VB that can use the DLL from my client machine - I don't have any Oracle drivers on my client - so I think that I want the DLL to run on the server.
Can this be done?
Thanks for any help
How Do I Code An Access To A SQL Server?
Hello,
I need do program an access to a SQL Server with ODBC.
All I need to do is to fill a Listbox in VB with data from this Server.
I would be grateful if anyone here knows a good tutorial or code sampe.
Have a nice weekend,
Simon
Server/Client - Need Code!
Does anyone know how I can make a server, and then a client...Only two buttons for now in the client "Shutdown, and Logoff". To shutdown, shelling c:WINDOWSsystem32shutdown.exe and for logoff c:WINDOWSsystem32logoff.exe. I've been wanting to make a server/client like this but no luck. And please dont tell me to search forums or pscode.com...I've tried that. I need code examples or project files thanks. And I'm wanting to do this just to get me started on making a network like program. If you can do this with Catalyst socketwrench I'd prefer that, but otherwise winsock is fine. Thanks.
Server Or Code Problem
Hi
I have an application with a SQL background.....Now when I test
my application accessing one of our SQL server it works perfectly
but yet when I change the *.ini to point to a different SQL server
it starts to mess-up.....is this a SQL server problem or is it a
coding problem ???
Thanks for replying!
[edit] The databases are exactly the same....
How To Register A Dll On Server Using Code!
Hi all me again ........ Okay quit with the sighs please
I need to find a way to make my app register a dll on a win 2k server. To complicate matters it needs to be registered with MTS (microsoft Transaction Server)
The dll is not going to be used by ASP or over the internet. It will however be used by clients on the internal network running a client application. This app needs to execute the dll on the Server to utilise some of the win2k ADSI api calls. I know that you can do this i just dont have the foggiest idea of where to start.
Any help will be greatly appreciated
Can I Move Old Code To IIS Server?
I have a large (50 Mb) business application with logic for both data handling and prognosis calculation.
When I started the application was only supposed to run on three PCs with Access databases. Now it interfaces with a Microsoft database instead of an Access dB.
The company wanted more and more functions and the application grew in complexity and size. The application is completely client-side. That means it is necessary to reinstall the client 70 times for one change.
I want to move the logic to a server, but don't want to necessarily write it all again.
Naturally, I would like to just "drop" the software onto a server and make it possible for the users to log in from any Internet Cafe. Is that possible? Can an IIS server run software that was originally written for clients that have Access installed?
Client And Server Code
I'd like to write a simple server and simple client application. Each of
them runnig on 2 differents computer "computer one" and "computer two".
- The client just connect to the server and send "hello"
- The server just accept the connection and answer "cool"
Any body get sample codes for me?
Code For Getting Sql Server UDF Value To A Variable
hi Friends,
Please send me the code to store return value of
User Defined Function of Sql Server in a variable. UDF
returns a scalar value.
CREATE FUNCTION NewBoardno()
RETURNS bigint AS
BEGIN
Declare @bno bigint
Select @bno=Max(boardno) from EnquiryDetail
return @bno
END
In VB Code what I want to write get return value.
Intnewbno=???????
Sujith Kumar
Same Code Access & SQL Server
I am writing a VB6 app that will be given away as a demo and will run using MS Ascess Db. Later if client decides to purchase, we will ship out MSDE or SQL Server.
My code below works with SQL 2000 but not MS Access 2000, no error is raised but data is not updated either. Must be a simple one but I cannot see it.
Thanks All, Graeme
[code]
params.Append objCommand.CreateParameter("@gst_inverse", adSmallInt, adParamInput, 0)
params.Append objCommand.CreateParameter("@letter_picture", adVarChar, adParamInput, 100)
.... continues.......
params("@company_name") = txtComp_name.EditValue
params("@abn") = txtABN.EditValue
params("@address_1") = "" & txtAddr1.EditValue
... continues .......
objCommand.Execute , , adExecuteNoRecords
... runs and updates SQL server, runs in MS Access but does not update or return error.
[/code]
TFTP Server Code Help
I need a simple TFTP server implemented into a program I'm working to download switch and router configs only. My program will tell the switches and routers to send configs to the tftp server and will also start the TFTP server. This is the code I have so far, not sure if it's correct but, it's all I can figure out. Can someone show me how to get the file and save it to my hard drive? Maybe someone has already done this and can help?
Private Sub Form_Load()
Winsock1.LocalPort = 69
Winsock1.Protocol = sckTCPProtocol
Winsock1.Listen
End Sub
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
If Winsock1.State <> sckClosed Then _
Winsock1.Close
Winsock1.Accept requested
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim strBuffer As String
Winsock1.GetData strBuffer
' Ok, got the strBuffer. The filename was already set
' from the source. So, how do I take strBuffer and save
' it to my c:
mTFTP-Root directory?
' Then get ready for another file to come in.
' If I lose connection somehow and don't get all the file is
' there a way to delete the fragmented file automatically?
' I don't care if the file already exists, I want to overwrite it.
Winsock1.Close
End Sub
How To Connect To Mail Server Using This Code ??
'Find out how many messages there are
Dim iMessages
iMessages = Mailer.MessageCount
Response.Write "There are " & iMessages & " messages on the server.<p>"
Although my email have a message but when i use browser to view, it display 0 messages. but it should display there are 1 messages on the server.
Can anyone help me ?? i need help badly ....
Thanx in Advance ....
Import Excel Into SQL Server Using Code
hi There,
Did anyone can teach me how to import data from excel into SQL Server? please also provide me some of the coding.... thanks for your genius brain...hehe
Client And Server Side Code
Hi,
I never took any course in networking. Can anyone explain me the concepts of client code and server code in Visual Basic?
Code Works Until Uploaded To Web Server
Hello,
Can anyone tell me why the following code works just fine on my PC, but as soon as it's uploaded to a web server, I receive Error #91 ?
Code:
Private Sub cmdRight_Click()
On Error GoTo 400
oxlApp.ActiveWindow.SmallScroll ToRight:=4 'ErrCode 91
Exit Sub
400:
MsgBox Err.Number & " " & Err.Description
End Sub
Private Sub cmdUp_Click()
On Error Resume Next
ActiveWindow.SmallScroll Up:=10
End Sub
Thanks In Advance,
LadyA
Resolved with: Worksheet.Activate in Sub Userform1_Activate()
SQL Server Database Backup Code
I am developing a client-server vb6 application with SQL Server 2000 as the database. I want to have a backup/restore functionality in vb6 using SQL- DMO where i am backing up the database to a file on the server rather than a device.
However, what i need was to allow users to select the folder where he wish to place his file. I can use Common Dialog control, but the problem is the common dialog control shows the local file system, whereas i want to show the users the file structure of the machine where SQL Server is installed. I have no idea on how to go about it.
|