Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info.
SEARCH THE FOXITE.COM VISUAL FOXPRO FORUM ARCHIVES
Please enter one or more search terms:
search (case insensitive):


order by:


sort:
SEARCH RESULT Results 2926 - 2950 of 3317 for SQLSTRINGCONNECT. (1.5444099 seconds)


RE: update/insert query slow in mysql
Thread ID: 407907 anand kulkarni RE: update/insert query slow in mysql Hello Vivek Sir > > this is my sample code. its a simple table dbf to web upload > > server = 'webserver address' dbase = 'database' dbaseuser = 'username' dbasepass = 'pass' > > SQLDISCONNECT(0) openConn = "Driver={MySQL ODBC 5.1 Driver};Port=3306"+";Server="+server+";Database="+dbase+";Uid="+dbaseuser+";Pwd="+dbasepass > lctmpresult = SQLSetProp(0, 'DISPLOGIN', 3) > PUBLIC SqlConnection STORE SQLSTRINGCONNECT(openConn) TO SqlConnection IF sqlconnection < 1 AERROR(aa) =MESSAGEBOX("Error Connecting...."+CHR(13)+aa[2],0+16,'Alert Message') RETURN endif > local lyes,lno lyes = 1 lno = 0

RE: Update/Insert/Delete using Cursor Adapte
=yes;" Datasourcetype = "ODBC" DataSource = sqlstringconnect(lcDB)
In Short I have this InitCA Custom Method, where this method is called in the Load event of my form: FORM LOAD EVENT: this.INITCA INITCA..., ORACLE etc. *===================================================== OTHERWISE .DataSource = sqlstringconnect(pcDB) ENDCASE *===================================================== .openTables ENDWITH
RE: Updateable cursor using sqlexec() command
them, using SQLEXEC to the server. Thus: *** Get a cursor lnCon = SQLSTRINGCONNECT("DRIVER=SQL Server;SERVER=TECHNICAL;UID=sa;PWD=pass;DATABASE=High-Tech-Times") SQLEXEC(lnCon,"SELECT * FROM BANKS",'BANKS') *** Add

RE: UPDATECMD, Does it works?
Thread ID: 42570 Ken Blum RE: UPDATECMD, Does it works? Don't know how you would update the backend DB without loading it in a cursoradapter and changing that cursor. However, you can issue SQL Statements via SQL Pass-Through (SPT). You get a handle to your backend DB via SQLConnect() if using ODBC, or SQLStringConnect() if not. Then you can issue SQL Statements directly to the backend DB via SQLEXEC(). For a more detailed explanation look it up in VFP help. MySQLHandle = SQLConnect("MySQLODBC","MyLoginName","MyPassword") && Must be setup in ODBC lnResult = SQLEXEC(MySQLHandle,"UPDATE MyTable SET MyField = 'SomeData') ? lnResult Note that you can get the SQL Handle from a CA

RE: updateing a mySQL database
Thread ID: 311071 Cetin Basoz RE: updateing a mySQL database Hello Guys > I have a mySql database on a file server and I would like to insert a record into a table in the database from a VFP app via the internet.... > How can I go this? > thanks in advance > Chris Smith First you need to have a connection string. You would use either ODBC or OLEDB connection string depending on what you are using (my preference is OLEDB). You can find the connection strings here: http://www.connectionstrings.com/mysql Then with ODBC it is something like: handle = SQLStringConnect( < your connection string here ) lcCommand = 'insert into myTable (field1, field2) values (?m.v1, ?m.v2)' v1 = "String

RE: updateing a mySQL database
Thread ID: 311071 chris smith RE: updateing a mySQL database Hello Guys > I have a mySql database on a file server and I would like to insert a record into a table in the database from a VFP app via the internet.... > How can I go this? > thanks in advance > Chris Smith > First you need to have a connection string. You would use either ODBC or OLEDB connection string depending on what you are using (my preference is OLEDB). You can find the connection strings here: > http://www.connectionstrings.com/mysql > Then with ODBC it is something like: > handle = SQLStringConnect( < your connection string here ) lcCommand = 'insert into myTable (field1, field2) values (?m.v1, ?m.v2)' > v1 = "String

RE: updateing a mySQL database
Thread ID: 311071 Cetin Basoz RE: updateing a mySQL database > First you need to have a connection string. You would use either ODBC or OLEDB connection string depending on what you are using (my preference is OLEDB). You can find the connection strings here: > http://www.connectionstrings.com/mysql > Then with ODBC it is something like: > handle = SQLStringConnect( < your connection string here ) lcCommand = 'insert into myTable (field1, field2) values (?m.v1... strings: handle = SQLStringConnect("Driver={SQL Server Native Client 10.0};server=www.discountasp.net;database=myDatabase;uid=cetin;pwd=basoz") handle = SQLStringConnect("Driver={SQL Server Native Client 10.0};server

RE: updateing a mySQL database
. Here are some sample connection strings: > handle = SQLStringConnect("Driver={SQL Server Native Client 10.0};server=www.discountasp.net;database=myDatabase;uid=cetin;pwd=basoz") > > handle = SQLStringConnect("Driver

RE: updateing a mySQL database
Thread ID: 311071 Cetin Basoz RE: updateing a mySQL database > With backends like mySQL, MS SQL and such you don't need VPN. In connection string the server might be a URI or TCP/IP address of a server in the other end of world. I don't use mysql but MSSQL. Here are some sample connection strings: > handle = SQLStringConnect("Driver={SQL Server Native Client 10.0};server=www.discountasp.net;database=myDatabase;uid=cetin;pwd=basoz") > > handle = SQLStringConnect("Driver={SQL Server Native Client 10.0};server=190.180.170.160;database=myDatabase;uid=cetin;pwd=basoz") > It is not a connection to a file server but service (unlike VF > > > P database mysql, mssql ... are service based

RE: updateing a mySQL database
. Here are some sample connection strings: > handle = SQLStringConnect("Driver={SQL Server Native Client 10.0};server=www.discountasp.net;database=myDatabase;uid=cetin;pwd=basoz") > > handle = SQLStringConnect("Driver

RE: Updating Access table via remote view with ...
Thread ID: 15873 Yuri Rubinov RE: Updating Access table via remote view with ... Can not answer to your question directly. But here is the approach where you could control all properties and processes via code: store SQLSTRINGCONNECT(; 'DBQ=c:\hi.mdb;'+; 'DefaultDir=c:\;'+; 'Driver={Microsoft Access Driver (*.mdb)}'); TO gnConnHandle * all other string details go here if neccessary IF gnConnHandle <= 0 = MESSAGEBOX('Cannot make connection', 16) return Endif *Check and set connection properties if needed using sqlgetprop/sqlsetprop ?sqlgetprop(gnConnHandle,"Asynchronous") ?sqlgetprop(gnConnHandle,"BatchMode") ?sqlgetprop(gnConnHandle,"ConnectBusy") ?sqlgetprop(gnConnHandle,"ConnectString

RE: Updating Excel using ODBC connection
Thread ID: 410248 Vilhelm-Ion Praisach RE: Updating Excel using ODBC connection I have the following code that works perfectly. > lcConnstr = [Driver=] + ; [{Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};] + ; [DBQ=] + lcXLBook + [;READONLY=FALSE] > IF !FILE( lcXLBook ) ? [Excel file not found] RETURN .F. ENDIF lnSQLHand = SQLSTRINGCONNECT( lcConnstr ) > lcSQLCmd = [Select item, sbtcode, color, thickness, "width in", "length ft", price, "weight lbs", feltnotes, In01, In02, In03, In04, In09 from "Full$" WHERE item is not null and sbtcode is not null and item 1442] lnSuccess = SQLEXEC( lnSQLHand, lcSQLCmd, [xlResults] ) ? [SQL Cmd Success:], IIF( lnSuccess 0, 'Good!', 'Failed

RE: Updating Excel using ODBC connection
Thread ID: 410248 Anders Altberg RE: Updating Excel using ODBC connection I have the following code that works perfectly. > lcConnstr = [Driver=] + ; [{Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};] + ; [DBQ=] + lcXLBook + [;READONLY=FALSE] > IF !FILE( lcXLBook ) ? [Excel file not found] RETURN .F. ENDIF lnSQLHand = SQLSTRINGCONNECT( lcConnstr ) > lcSQLCmd = [Select item, sbtcode, color, thickness, "width in", "length ft", price, "weight lbs", feltnotes, In01, In02, In03, In04, In09 from "Full$" WHERE item is not null and sbtcode is not null and item 1442] lnSuccess = SQLEXEC( lnSQLHand, lcSQLCmd, [xlResults] ) ? [SQL Cmd Success:], IIF( lnSuccess 0, 'Good!', 'Failed

RE: Updating Remote Data
can share an existing connection so that two or more views can be within the same RDBMS transaction, as a pseudo example: lnHandle = SqlStringConnect(... USE yourDBC!vOne NODATA IN 0 CONNSTRING m.lnHandle USE yourDBC

RE: Updating Remote Data
example: > lnHandle = SqlStringConnect(... USE yourDBC!vOne NODATA IN 0 CONNSTRING m. USE yourDBC!vTwo NODATA IN 0 CONNSTRING m. ? CURSORGETPROP("ConnectHandle",'vOne') && some number ? CURSORGETPROP("ConnectHandle

RE: Updating Remote Data
Thread ID: 332648 Stefan Wuebbe RE: Updating Remote Data > > If you open Remote Views using the ConnString clause, you can share an existing connection so that two or more views can be within the same RDBMS transaction, as a pseudo example: > lnHandle = SqlStringConnect(... USE yourDBC!vOne NODATA IN 0 CONNSTRING m.lnHandle USE yourDBC!vTwo NODATA IN 0 CONNSTRING m.lnHandle ? CURSORGETPROP("ConnectHandle",'vOne') && some number ? CURSORGETPROP("ConnectHandle",'vTwo') && same number > > > > hth -Stefan > > Hi Stefan, Thanks alot for your assistance. I shall put this code into use and let you know thereafter. I Have'nt used it before and have no proper vfp books for reference

RE: uploading data vfp6 from excel 2010
object. The ODBC drivers can be used with SPT and Remote views (and the CursorAdapter class) and VFP's SQLSTRINGCONNECT() function. Excel 2010 is version 14 there are drivers at www.connectionstrings.com. -Anders

RE: uploading data vfp6 from excel 2010
Thread ID: 385832 Leonard Trevor RE: uploading data vfp6 from excel 2010 > Please clarify . > What am I to do? > > I saved the data in 95/ edition however I was unable to upload thereafter while in excel 2010. > I'm getting confused. If you're using VFP to read Excel files, you're downloading not uploading, I'd say. The solution would be to treat Excel as a remote database with OLEDB drivers and ODBC drivers. OLEDB drivers can be used with VFP's CursorAdapter class and the ADODB.Connection object. The ODBC drivers can be used with SPT and Remote views (and the CursorAdapter class) and VFP's SQLSTRINGCONNECT() function. Excel 2010 is version 14 there are drivers at www.connectionstrings.com. -Anders

RE: uploading data vfp6 from excel 2010
Thread ID: 385832 Anders Altberg RE: uploading data vfp6 from excel 2010 > I'm getting confused. If you're using VFP to read Excel files, you're downloading not uploading, I'd say. The solution would be to treat Excel as a remote database with OLEDB drivers and ODBC drivers. OLEDB drivers can be used with VFP's CursorAdapter class and the ADODB.Connection object. The ODBC drivers can be used with SPT and Remote views (and the CursorAdapter class) and VFP's SQLSTRINGCONNECT() function. Excel 2010 is version 14 there are drivers at www.connectionstrings.com. -Anders > > The connection being used is ODBC as shown below :: > ************************************************************ ************************************************************ STORE

RE: uploading data vfp6 from excel 2010
Thread ID: 385832 Anders Altberg RE: uploading data vfp6 from excel 2010 > Does the SQLCONNECT( ) work? You should also check the return value of nReturn2. If <=0 use AERROR(aErrorarray) to read the error message in aErrorarray. Also if you not connected you have to do something about it. > -Anders > > Yes > What new way do have to import from excel 2010 via vfp6 into a temporary cursory before saving to > ms sql server. > The connection is ok. You can try After checking that the Office 2010 ODBC is installed. Might chck the OLEDB support is on place as well; it should be if Office 2010 is present on your machine: nConn = SQLCONNECT('Excel Files') or nConn = SQLSTRINGCONNECT( "ODBC

RE: uploading data vfp6 from excel 2010
Thread ID: 385832 DEREK DODOO RE: uploading data vfp6 from excel 2010 > > Yes > What new way do have to import from excel 2010 via vfp6 into a temporary cursory before saving to > ms sql server. > The connection is ok. You can try After checking that the Office 2010 ODBC is installed. Might chck the OLEDB support is on place as well; it should be if Office 2010 is present on your machine: nConn = SQLCONNECT('Excel Files') or nConn = SQLSTRINGCONNECT( "ODBC... name is mandatory so the entire query must be written inside ' ' single quotes, or [ ] brackets. > -Anders Trying to digest the program above nConn = SQLCONNECT('Excel Files') or nConn = SQLSTRINGCONNECT( "ODBC

RE: uploading data vfp6 from excel 2010
Thread ID: 385832 Anders Altberg RE: uploading data vfp6 from excel 2010 You can try After checking that the Office 2010 ODBC is installed. Might chck the OLEDB support is on place as well; it should be if Office 2010 is present on your machine: nConn = SQLCONNECT('Excel Files') or nConn = SQLSTRINGCONNECT( "ODBC connection string from www.connectionstrings.com/excel-2010") nTables=SQLTABLES(nConn, 'TABLE', 'mytablescursor') * pick a tablename nSuccess = SQLEXEC... > > nConn = SQLCONNECT('Excel Files') or nConn = SQLSTRINGCONNECT( "ODBC connection string from www.connectionstrings.com/excel-2010") nTables=SQLTABLES(nConn, 'TABLE', 'mytablescursor') * pick a tablename nSuccess = SQLEXEC

RE: Upsizing Question
test data lnHandle = Sqlstringconnect('Driver={SQL Native Client};Server=.\SQLExpress;Trusted_Connection=yes') SQLExec(m.lnHandle,'Create Database ImageDb') SQLExec(m.lnHandle,'Use ImageDb') SQLExec(m.lnHandle,'Create Table... lnHandle = Sqlstringconnect('Driver={SQL Native Client};Server=.\SQLExpress;Trusted_Connection=yes') CursorSetProp("MapBinary",.T.,0) SQLExec(m.lnHandle,'select * from ImageDb..ImageTable','Sample') SQLDisconnect

RE: upsizing to MySql
Thread ID: 120664 Borislav Borissov RE: upsizing to MySql We are currently upgrading our software to use Mysql db primarily for security and flexability reasons. > What we want is to have the end user enter the db ip address, db name and login, and have the software work with it. > My questions are, what are your recommendations and any examples. > We are using spt. All the data has been ported to mysql. > Thanks in advance, Kenan Write these values with GOOD encryption in INI or in the registry. Then in you main program read then and store that vaules in your main application object SQLSTRINGCONNECT() or SQLCONNECT() and work with that sqlHandler. Borislav Borissov Freedom for Bulgarian

RE: upsizing to MySql
Thread ID: 120664 kenan cejvan RE: upsizing to MySql We are currently upgrading our software to use Mysql db primarily for security and flexability reasons. > What we want is to have the end user enter the db ip address, db name and login, and have the software work with it. > My questions are, what are your recommendations and any examples. > We are using spt. All the data has been ported to mysql. > Thanks in advance, Kenan > Write these values with GOOD encryption in INI or in the registry. Then in you main program read then and store that vaules in your main application object SQLSTRINGCONNECT() or SQLCONNECT() and work with that sqlHandler. > > Borislav Borissov Freedom for Bulgarian


Result Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133