Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

connecting/odbc with database on server

$
0
0

My experience with database connections has been limited to localized files such as Access or FoxPro databases.  Now I need to connect to a database on a server such as FileMaker which is like MS SQL Server for those unfamiliar with FileMaker.  Likewise with an Access database, I need to perform SQL queries such as select, insert, update, delete but am stuck on few things since I want installation portability so I don't necessarily have to hardcode things.

coding example with Access:

GlobalVars.ECitationSource = (Path.Combine(System.Windows.Forms.Application.StartupPath, @"Ecitation.accdb"));
            myconS = new OleDbConnection(odbcstring(GlobalVars.ECitationSource));
            myconS.Open();
            cmdstr = @"SELECT MakeName from VehicleMake order by MakeName;";
            cmd = new OleDbCommand(cmdstr, myconS);
            reader = cmd.ExecuteReader();

From a brief glance, I know I can at least setup and ODBC and somehow refer to it but am concerned that the DSN from one network may not be the same or could conflict with something else. Are there any examples even to an MS SQL or Filemaker sample database that can lead me in the right direction on my development?


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>