I'am completly new to SAS(and all these techincal things), but i need connect a network drive (or FTP?) to SAS, so i can copy or send files to it. I guess, it should look like another server at a workspace or something. I only know the address of it(maybe it will give you some clue):
\\10.48.42.166\exportsexternal1\oaDiez0Naf
The problem is even in that i don't know how to google it correctly - all link's are mainly about FILENAME in FTP
Related
I would like to create an .exe app which allows me to connect
to my network share \\localcloud\public and then do a few things (update, copy files etc).
I know in Java there're few libraries like jCIFS, but I can't find equivalent in C++ language. I'm not interested to "mount network drive", just connect, do something with files and disconnect. Is it possible?
Quick background, I am an intern at a company assigned to a project that I have no experience with, and I need some help trying to figure out where to start.
The goal of the project is to transfer very large chunks of data from a database, to a PC and then to a Mac. I am trying to code the communication between the PC and the Mac (this has to be done in c++, I've heard Python is easier but I have to use c++). Some requirements are that the PC and Mac be directly connected via an ethernet cable, and neither computer will have access to internet. The data transfer needs to be automated, so whenever the PC detects that it has received a full dataset from the database, it transfers the data to the PC. I cannot use any third party software to do this.
So far, through the research I've done, I think I need to set up a TCP Server-Client network. I've been using the code here (http://cs.ecs.baylor.edu/~donahoo/practical/CSockets/practical/) as a guideline for socket coding. I am first trying to test this by sending files between two macs (I don't have access to a PC atm). Any guidelines as to where I go from here would be helpful. I have looked into setting up static IP addresses and such, but I get stuck from there.
I don't expect anyone to code this for me, I am just new to socket coding and this sort of project, so just looking for a nudge in the right direction. Thanks!
Before you start coding, keep in mind that to connect PC to Mac you may need a crossover cable.
Then do some reading on the wired ad-hoc networks. The last post in this discussion may help.
Finally, configure and mount shared volumes (using the stock software, no 3rd parties involved), and don't use the low-level socket interface.
I am working on an application that, among other applications, allows users to send emails. It works by writing everything onto an SQL server, so you can have multiple instances of an application.
The email sending currently works with an "Outbox" table on the SQL server, to which application instances directly write the data with SQL statements. I have, however, hit an issue, that a requirement for attachments on the emails has arisen.
My thinking is that if I can send the attached files to a directory on which the SQL server resides (possibly the TEMP directory?), and then store the path to that file (or a UUID, if the file is constant) in the table. The issue is I have no idea particularly where to start with sending the file, as I am still vaguely new to C++.
One term I have come across is sending it with sockets, but am struggling with where to start with it and do not know if it is indeed the best option. Could anyone provide some advice on this matter?
Thanks in advance.
If I correctly understand the way it works (applications save the emails to SQL then another application takes them out and sends them) you have two choices:
Save the attachment as binary in the SQL and have the mailer application do the rest.
Use sockets to transfer the file to the SQL server and save the path to it just as you said.
I'd say option 1 would be the best option if I understood correctly the way its currently working. And as for option 2, there are probably other ways to transfer the file but sockets would be the easily cross-platform option.
Its not hard to get started with sockets, there are a lot of examples all over the internet.
winsock
more winsock
sys/socket.h
more sys/socket.h
Either this this question isn't asked often (possible), everyone knows how to do it (doubtful), or I don't know how to search for it (likely).
I want to get my C++ program talking to my MySQL server and able to run commands on it. I know MySQL has connector code available, but 1) it seems like much more than I need and 2) I just cannot seem to get it to work anyway.
I want to be able to test the program on my computer, so remote access would be necessary. I do have SSH for the server.
My final deployment will be able to run on the server itself.
Executing and receiving/parsing output from MySQL databases is quite easy to do by hand. I can't however, figure out which way to go to get my program to do this.
I figure I should be able to:
1. ssh into the web server (with password)
2. access the MySQL database
3. execute statements and retrieve their output
I've read a lot about fork() and popen(), but due to their read-only or write-only limitations (unless I misunderstand), I just don't know where to go. Obviously I'd just take out the SSH step when the time comes to deploy it on the server. Can somebody give me some direction on this, or is this just not possible (doubtful).
It is our own dedicated server so we have full reign with ssh and WHM, but I'd rather minimize the "intrusion" since I don't know enough about all the software on there if I broke something. I just want to communicate [directly] with the MySQL database.
Thanks so much! You guys are awesome!
If you have SSH access, then you're way overcomplicating this.
Step 1: Set up an SSH tunnel:
ssh -L 3306:localhost:3306 user#your.host.com
Step 2: Use the local port like normal (i.e. just refer to localhost)
mysql -u root -p < somescript.sql
However since you're using C++, you really should use a proper library (e.g. MySQL++). Educate yourself on SSH tunnels, they make life so much easier once you know about them.
Suppose I have 3 computers each collecting data and storing that data in files on the hard drive. I would like those computers to send those files to a 4th computer. What is the simplest way to accomplish this?
The simplest way I can think of would be to have the 4th computer advertise a shared network drive, and then have the 3 computers mount that drive as a pseudo-local drive (N:\ or whatever). Then all the 3 computers have to do is write or copy the files onto n:\whatever_folder. No network programming required.
Create an FTP server on the 4th computer, and have each of the 3 data-collectors upload their files there.
How to establish an FTP server is beyond the scope of this question, or even SO. Ask on serverfault (I think).