Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. campagnolo1

    Windows Form to update VFP table with datagrid

    Greetings everyone, I'm stuck on a project that has me turning in circles and I need some help. I have created a small windows form project in VS2010 using C#. The form has a datagrid which is tied to a VFP table. The table has no primary key and I can't add one (the table was given to me and I...
  2. campagnolo1

    converting a VFP9 script to C#

    Craig, thank you for your reply. I actually don't need the SQL data. All the VFP data gets used and then put into a SQL table. So all that would need to happen is to get the VFP data, clear the SQL table and put the VFP data into the SQL table. Since I'm still fairly new to all this, do you...
  3. campagnolo1

    converting a VFP9 script to C#

    ...soheader Inner Join Soroute On soheader.sono = Soroute.sono; LEFT Join immaster On soheader.partno = immaster.Item; Into Cursor c1 Select c1.*,; Somater.partno As partno,; STR(Asc(Somater.Phanref),3)As Phanref,; STR(Asc(Somater.Phanid),3)As Phanid,; VAL(Somater.qty_assy) As qty_assy...
  4. campagnolo1

    how to update SQL table from FoxPro cursor

    Olaf, great suggestions! Tried the following: protected void Page_Init(object sender, EventArgs e) { OleDbConnection oConn = new OleDbConnection("provider=VFPOLEDB.1; data source='F:\\TIW\\KOKAC'"); oConn.Open(); OleDbCommand oCom = new...
  5. campagnolo1

    how to update SQL table from FoxPro cursor

    ...In 0 Set TABLEVALIDATE To 0 Use F:\TIW\KOKWS\bmsl In 0 Set TABLEVALIDATE To 0 Use F:\TIW\KOKWS\Soroute In 0 Set TABLEVALIDATE To 0 **If File("C:\Temp\itemprojimstock.DBF" ) **Delete File ("C:\Temp\itemprojimstock.DBF") **ENDIF connstr = SQLSTRINGCONNECT("Driver={SQL Server}...
  6. campagnolo1

    how to update SQL table from FoxPro cursor

    Olaf, sorry it has taken me a while to get back to you. I had some work that needed to get done urgently and didn't get a chance to look at your post until today. So I set up my script the way you suggested and added the ID field to the SQL table. But once I ran the script and then the report I...
  7. campagnolo1

    how to update SQL table from FoxPro cursor

    Okay guys, I think I'm going to have to let the VFP approach settle in a little over the weekend, my head is starting to spin! Now the SQL code works nicely and is quite fast, but I discovered an issue that I wanted to bring to your attention to see if you have an idea what could be done...
  8. campagnolo1

    how to update SQL table from FoxPro cursor

    Mike, how would I go about just deleting the records and appending? I appreciate your help and I'm trying to understand both ways, yours and Olaf's. I think ultimately I'm hoping to go with the SQL solution, but I also would like to get the VFP solution just so I have options. And I can't say...
  9. campagnolo1

    how to update SQL table from FoxPro cursor

    ...In 0 Set TABLEVALIDATE To 0 Use F:\TIW\KOKWS\bmsl In 0 Set TABLEVALIDATE To 0 Use F:\TIW\KOKWS\Soroute In 0 Set TABLEVALIDATE To 0 **If File("C:\Temp\itemprojimstock.DBF" ) **Delete File ("C:\Temp\itemprojimstock.DBF") **ENDIF connstr = SQLSTRINGCONNECT("Driver={SQL Server}...
  10. campagnolo1

    how to update SQL table from FoxPro cursor

    So, I've been looking at the tutorial for configuring the OLE DB datasource, unfortunately without success. I set up two datasources, one OLE DB and one ODBC, and configured the report to use them (one at a time of course). Both times I ran the report and then tried to run the VFP exe, both...
  11. campagnolo1

    how to update SQL table from FoxPro cursor

    Mike, is this what you are talking about? How to configure an OLE DB driver Chris
  12. campagnolo1

    how to update SQL table from FoxPro cursor

    ...learned a lot! Now to Olaf's code from earlier on: 1. There is no ID field, I set the Item field as the primary key. SQLEXEC(connstr,"SELECT * FROM itemprojimstock WHERE 1=0","curAppend") SET MULTILOCKS ON CURSORSETPROP('Buffering',5,'curAppend')...
  13. campagnolo1

    how to update SQL table from FoxPro cursor

    Good morning gentlemen, Mike, currently everything (accounting and manufacturing software) is using FoxPro dbf free table directories. We are creating custom tables for a few of our Crystal reports that would otherwise either not be able to run or would take forever to run. I'm now in the...
  14. campagnolo1

    how to update SQL table from FoxPro cursor

    ...many arguments" error. Not sure why, all arguments are valid according to the Help. I've tried different syntax but still get the error. Select C5.*, bmsl.findno, bmsl.scrpad; FROM C5 Left Join bmsl On C5.fg + C5.partno + C5.sorev = bmsl.itemparent + bmsl.itemchild + bmsl.rev; INTO Cursor...
  15. campagnolo1

    how to update SQL table from FoxPro cursor

    Mike, you mentioned I have read about this but I can't find where or how to change the properties of the OLE DB driver. Where would that be? Olaf, working on your suggestions right now. Chris
  16. campagnolo1

    how to update SQL table from FoxPro cursor

    Olaf, the operating system on our terminal server where the reports are run is inded 64bit. And the fact that most likely we will change our accounting and manufacturing software to a SQL backend version influenced my decision to try getting the FoxPro data into SQL tables. I will try your...
  17. campagnolo1

    how to update SQL table from FoxPro cursor

    Gentlemen, thanks again for your advice. The reason I'm trying to put the data into SQL is that if I run the Crystal Report on the dbf file, the report keeps its "hooks" in the database file. So if somebody else tries to run the report and the subsequent exe, the file is locked and can't be...
  18. campagnolo1

    how to update SQL table from FoxPro cursor

    Mike, I'm about to get off work right now so I will look at your suggestions tomorrow. Thank you again so far for all your help and guidance! Talk to you soon, Chris
  19. campagnolo1

    how to update SQL table from FoxPro cursor

    Mike, got it to work now! Thank you so much for your guidance! Even though it works nicely, it's a bit slow filling the SQL database. Select C5.*, bmsl.findno, bmsl.scrpad; FROM C5 Left Join bmsl On C5.fg + C5.partno + C5.sorev = bmsl.itemparent + bmsl.itemchild + bmsl.rev; INTO Cursor C6...
  20. campagnolo1

    how to update SQL table from FoxPro cursor

    ...Your sample code helped but also confused me a bit because you used C5 but the last cursor created is C6. So I came up with this code: Select C5.*, bmsl.findno, bmsl.scrpad; FROM C5 Left Join bmsl On C5.fg + C5.partno + C5.sorev = bmsl.itemparent + bmsl.itemchild + bmsl.rev; INTO Cursor C6...

Part and Inventory Search

Back
Top