Query Server Error When Accessing Visual FoxPro 9.0 Via ODBC
Nov 6, 2007
I have a report that accessed a Visual FoxPro 6.0 database via ODBC. Since I upgraded to Visual FoxPro 9.0, now I am getting the error:
Query Server Error
DMS-E-RBI_TABLE The table or view <table name> was not found in the dictionary
I've verified that the right path is setup and I've tried installing about every driver and none of them are working. I created a new database in 9.0 and the I can access it fine. Also, there are old tables that are accessible in the same path, just not the ones I need. Any ideas would be helpful..
View 1 Replies
ADVERTISEMENT
Aug 30, 2007
Hi all,
I created a package that extracts records from a .DBF file into an SQL Server database. I installed a Visual FoxPro plugin (vfpoledb). When I run the package from my PC, it runs smoothly. But, when I try to run the same package in another PC, it displays a DTS_E_OLEDBERROR "Class not registered" error. Anyone has an idea about what this means? thanks in advance.
View 3 Replies
View Related
Jun 20, 2006
Hi,
I have 2 separate clients experiencing this problem,
Both systems are
1.Win 2000 Server with Small Business Server 2000 (SP4)
2.SQL Server 2000 (SP2 upgraded to SP4, SP4)
3.Exchange
4.IIS etc
We use SQL Server to connect to FoxPro 2.6 Tables.
We are using OPENROWSET as follows:
Select * from openrowset('VFPOLEDB.1','C:Client Data';;,'Select * from cm')
We are now getting this error:
Server: Msg 7330, Level 16, State 2, Line 1 Could not fetch a row from OLE DB provider 'vfpoleDB.1'. OLE DB error trace [OLE/DB Provider 'vfpoleDB.1' IRowset::GetNextRows returned 0x80040155].
The statement worked up until around 20 days ago, which made us think that it may be windows updates/sps/hotfixes, but i have installed the above on a test machine and installed all windows updates and the test machine works AOK.
Has anybody seen this error?
Thanks in advance
Q
View 2 Replies
View Related
Jun 20, 2006
Hi,
I have 2 separate clients experiencing this problem,
Both systems are
Win 2000 Server with Small Business Server 2000 (SP4)
SQL Server 2000 (SP2 upgraded to SP4, SP4)
Exchange
IIS etc
We use SQL Server to connect to FoxPro 2.6 Tables.
We are using OPENROWSET as follows:
Select * from openrowset('VFPOLEDB.1','C:Client Data';;,'Select * from cm')
We are now getting this error:
Server: Msg 7330, Level 16, State 2, Line 1 Could not fetch a row from OLE DB provider 'vfpoleDB.1'. OLE DB error trace [OLE/DB Provider 'vfpoleDB.1' IRowset::GetNextRows returned 0x80040155].
The statement worked up until around 20 days ago, which made us think that it may be windows updates/sps/hotfixes, but i have installed the above on a test machine and installed all windows updates and the test machine works AOK.
Has anybody seen this error?
Thanks in advance
Q
View 7 Replies
View Related
Nov 4, 2004
Dear All,
I like to know if anyone of you out there can help me solve this issue. I need to generate an SQL Query to access two different FOXPro (databases) connections.
Example,
Connection 1 - has a DSN setup of CMSBM and it sits in the path of D:/CMS/CMSBM/= and the table is bmboml15
Connection 2 - has a DSN setup of CMSMA and it sits in the path of
D:/CMS/CMSMA/= and the table is maprodl15
I am coding in ASP.NET using C#. I have tried the command like:
SELECT codeno, link, type FROM bmboml15 IN CMSBM INNER JOIN maprodl15 IN CMSMA ON bmboml15.codeno = maprodl15.codeno.
Obviously the above query is not a working one and a very poor construction.
Please help!
Thanks
Clo
View 1 Replies
View Related
Jul 15, 2004
Hi,
Today was my first day to use DTS. I tried to transfer a Visual FoxPro Database to my SQL Server. I noticed that I am getting errors on the data that contains date fields. So, for testing purposes I transformed the Visual FoxPro fields that contained datefields into char fields. And this works, but obviously I cannot hunt around in a huge database looking for datefields in tables and change them manually. Plus, by changing to char fields I noticed that those fields that are empty are transformed as 1899-12-30. :p
Does anyone have any ideas?
Thanks,
Laura
View 3 Replies
View Related
Jun 19, 2007
I am trying to add a FoxPro linked server to MS SQL 2005, and I can't seam to create a linked server that works. What am I doing wrong in linking the server?
I have an ODBC connection that worked but not OLEDB; how can I do this with OLEDB (either VFPOLEDB or Jet, if it will work) and not ODBC.
This is what I thought was right
Code Snippet
sp_addlinkedserver 'test',
'FoxPro',
'VFPOLEDB',
'C:DataSomeDatabase.dbc',
NULL,
NULL,
NULL
But it gives the error:
Cannot create an instance of OLE DB provider "VFPOLEDB" for linked server "test".
Also I know in MS SQL 2000 once you linked a server you could view it in EM, but when I linked the VFP via ODBC I could query agianst it, but I could not open it in Mangament Studio.
Thank you in advance.
View 11 Replies
View Related
Feb 20, 2005
I've downloaded and installed the latest VFPOLEDB (12/04) on 2 separate SQL Server boxes.
In both cases, If I connect to SQL Server with Query Analyzer as (local) while on a box, the linked server to my foxpro database works fine with openquery().
However, If I'm at one box and attached to SQL Server on the other box, the openquery() fails.
Here's some particulars:
---
EXEC sp_addlinkedserver
@server='VFP',
@provider='VFPOLEDB',
@datasrc='\hdmcpdctis1 isrnddata',
@srvproduct='Visual FoxPro'
--this works on either (local) box
SELECT *
FROM OPENQUERY(VFP, 'select * from tislists')
Go
--but, the same openquery() above doesn't work if the box I'm running it from is attached to the SQL Server on the other box. I get:
Server: Msg 7302, Level 16, State 1, Line 1
Could not create an instance of OLE DB provider 'VFPOLEDB'.
OLE DB error trace [Non-interface error: CoCreate of DSO for VFPOLEDB returned 0x80040154].
=====================
One other approach I tried that works while on the (local) box, but fails when attached to the SQL Server on the other box:
select * from openrowset('MSDASQL',
'Driver=Microsoft Visual FoxPro Driver;SourceType=DBF;SourceDB= \hdmcpdctis1 isrnddata ',
'select * from [tislists.DBF]')
With error:
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: [Microsoft][ODBC Driver Manager] Driver does not support this function]
OLE DB error trace [OLE/DB Provider 'MSDASQL' IDBInitialize::Initialize returned 0x80004005: ].
===========================
Any Help is greatly appreciated! Thanks,
peter :confused:
View 5 Replies
View Related
Jul 13, 2015
I'm running SQL Server 2008 (x64) version.
How can i create a linked server for Microsoft Visual Foxpro databases ?
I'm using Microsoft.ACE.OLEDB.12.0 driver.
I success create a linked server, and can browse all tables from linked server connections, but why when query data using
SELECT * FROM OPENQUERY(PIP_TEST,'select * from tbctrl')
It getting error message
Cannot process the object "select * from tbctrl". The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "pip_test" indicates that either the object has no columns or the current user does not have permissions on that object.
View 6 Replies
View Related
Jul 23, 2005
I'm trying to access Visual Fox Pro Data from Sql Server 2000, Cananyone have any Idea ?Thanks
View 1 Replies
View Related
May 17, 2007
Greetings,
I am unsure if this is the correct forum to send this question, but I can't seem to find any information regarding this problem. If this is the wrong place, please direct me to the correct spot.
I am attempting to import data from a free tables FoxPro database to SQL 2000 using a DTS Package which has worked correctly every day for the past 2 years. Yesterday, I got an error.
The package has around 10 tables that it deletes, re-creates, and populates with data from the Foxpro. All of the tables except one work correctly.
When I try to do an explicit import using the ODBC connection to populate that one table, I get the following error: Context: Error calling Openrowset on the provider.
I created an access database on my local computer and setup an ODBC connection and link tables to the database to see if it would work, and it did. So I thought there might be something wrong with the ODBC data source on the SQL Server, so I deleted it and created a new one, used it and I receive the same error.
I thank you in advance for any assistance or direction you can provide me for finding an answer.
View 4 Replies
View Related
Oct 24, 2007
After installing sql2005 sp2 a simple select query to a linked server reports the following error message:
Msg 0, Level 11, State 0, Line 0A severe error occurred on the current command. The results, if any, should be discarded.Msg 0, Level 20, State 0, Line 0A severe error occurred on the current command. The results, if any, should be discarded.
Before installing SP2 we used sql2005 without any service packs, the linked server worked fine.
The linked server is a Visual FoxPro database.
After uninstalling and installing the 'Microsoft OLE DB Provider for Visual FoxPro 9.0' the issue stil remains.
View 3 Replies
View Related
Jul 23, 2005
Hi all,I am fairly new to using triggers and was seeking some help from thosethat have experience with them. I am looking to transfer data from aSQL 2000 database to a Visual FoxPro database on another computer. Iwould like to transfer about three fields of data to a VFP table eachtime an insert is made on the SQL table. I am some what familiar withthe structure of creating the trigger but here is what I would likehelp with: Selecting the SQL data to transfer, Connecting to VFPdatabase, Insert SQL data into VFP table.CREATE TRIGGER [xyz] ON [dbo].[AAA]FOR INSERT??? Select a,b,c from SQL table??? Connect to VFP Database and Table??? Insert into VFP table Values a,b,cAny information, tips, or even an example Trigger procedure would helpand be greatly appreciated.Thank you,Brett
View 1 Replies
View Related
Mar 12, 2008
We are experiencing failures when accessing a datatype="Attachments" field in a query in an MS Access 2007 database using ACE ODBC or OLEDB drivers.
We are using an MS Access 2007 database
ACE ODBC/OLEDB drivers installed (i.e. Office 2007, which installs these drivers)
DB contains a table with a field of type "Attachments" (which is new in MS Access 2007)
DB contains a query that selects the fields of the above table
Using ACE ODBC or ACE OLEDB drivers to display the table works fine. The "Attachments" field is displayed as the file name of the attachment(s).
However, using either ACE ODBC or ACE OLEDB to display the query (i.e. NOT the table) results in either incorrect results or unexpected failures of the ODBC/OLEDB drivers.
Error using ODBC (using "ODBC Test"):
=============================
select * from Query1 does not give an error, but displays a "1" for the Attachment field.
select Attachments from Query1 gives the following error:
stmt: szSqlState = "HY000", *pfNativeError = -3087, *pcbErrorMsg = 97,
*ColumnNumber = -2, *RowNumber = -2
MessageText = "[Microsoft][ODBC Microsoft Access Driver] Reserved error (|);
there is no message for this error."
Error using OLEDB (using "RowSetViewer"):
================================
select * from Query1 gives the following error:
Interface: Unknown
Result: 0x0004001 = E_NOTIMPL
FormatMessage: €œNot implemented
File: F:DepotSQLVaultmdac28sdkSamplesoledb
owsetviewerSDKobji386CRowset.cpp
Line: 616
select Attachments from Query1 gives the following error:
Interface: IID_ICommand
Result: 0x0004005 = E_FAIL
IErrorInfo: [0x0000f3f1] €œUnspecified error€?
File: F:DepotSQLVaultmdac28sdkSamplesoledb
owsetviewerSDKobji386CCommand.cpp
Line: 439
If it would help to analyze the problem, I have a folder containing all pertinent files (bare-bone database, tools, instructions) to reproduce this. I could attach it as a ZIP file, if requested.
Thanks,
Joe
View 1 Replies
View Related
Feb 27, 2007
Im quite interested to see if any one is using Microsoft OLE DB Provider for Visual FoxPro 9.0 in an SSIS package. Is it possible to use this for free table directory like you can with the ODBC driver. ????
thanks kindly
My basic proccess is as follows: The source foxpro database has hundreds of dbf files ---the SSIS procress is as follows
1: Copy only required dbf files and/or matching .fpt files over to local drive on SSIS box(we only need 10 files)
use MS Visual Foxpro ODBC driver (free table option) and set up a system DSN--dataflow tab---datareader source--and away you go
View 1 Replies
View Related
Jan 3, 2007
Good day,
Current Setup:
Using:
Visual Web Developer Express
SQL Express
IIS 6.0 with >net 2.0 Installed
Visual Foxpro
I actually have two questions (but am making good progress so will focus on the issue at hand).
1. I setup a Login.aspx / Default.aspx / Register.apsx / Membership.aspx as specified in the examples in MSDN...all is working ok.
2. When I register a new user, I wanted to capture their Customer ID during login to store in their Membership view table. I did this and is working ok....and to make it easy, am storing the value in Comments field.
3. I want to query a Visual Fox free table (DBF) that contains my client's Customer Invoice data...and have the ODBC Connection setup and working properly.
Here's the problem....
I'm having trouble formulating the SELECT string within the asp code to capture the Membership.Comments field.
I need the proper functions to grab the Comments field data and then use it within my select statement.
Presently, the query works if I just hard-code the value i.e.
"SELECT * from [invdata] WHERE cus_no = '1' "
I need to replace the '1' with the comments field data.
Thanks:
On a side issue: it took me days to just to get this all working to where it is...does anyone have a detailed example of how to Login to a site and pass the parms to another page to query the Logged In user's data from a database......a real world example that I have yet to see highlighted anywhere in the Forums or books I've bought.
For example: I am customer ABC123, I log in to my vendor's site and want to see all my orders placed.
View 1 Replies
View Related
Apr 10, 2008
Hello,
There is a SQL Server databse installed in my machine.
I want to modify a data in a table.
How can I access the data with ODBC Administration?
Thanks
View 6 Replies
View Related
Nov 24, 2006
Hi,
I am migrating from MySQL 5 to SQL Server Express 2005 (SP1) and I am having some remote connections issues. I have tried just about everything that I have read in the forums and in Microsoft's knowledge base about remote connections with SQL Server. I am using Visual FoxPro 9 as my client and connecting with ODBC to SQL Server. The strange thing about my issue is that I can connect just fine with localhost or using my LAN IP address. Before I get to the errors, here is what I have configured:
Remote connections are allowed, TCP is active, SQL Browser service is active and running, my router forwards requests on ports 4567 (my custom port that I setup IP1 in SQL Server Configuration Manager to listen on), 1433 and 1434 (TCP and UDP for all) to my local IP address. My firewall will not block ports 4567, 1433 or 1434 (TCP and UDP for all). I even tried turning my firewall off.
For example, the following connection strings work. The first works when I am at the same computer as my SQL Server, the second works from a different computer on the same LAN.
Driver=SQL Native Client;Server=localhostsqlexpress;Database=xyz;Uid=adm;Pwd=pw
Driver=SQL Native Client;Server=192.168.1.3sqlexpress;Database=xyz;Uid=adm;Pwd=pw
When I try the following connection strings (with either my hostname or internet IP address, I get one of several failures):
Driver=SQL Native Client;Server=my.domain.comsqlexpress;Database=xyz;Uid=adm;Pwd=pw
The above strings yields this error message: [Microsoft][SQL Native Client]SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]
Driver=SQL Native Client;Server=my.domain.comsqlexpress,1433;Database=xyz;Uid=adm;Pwd=pw
Driver=SQL Native Client;Server=my.domain.comsqlexpress,4567;Database=xyz;Uid=adm;Pwd=pw
Using either the SQL default port or a custom port yields this error message: [Microsoft][SQL Native Client]Login timeout expired Connectivity error: [Microsoft][SQL Native Client]TCP Provider: No connection could be made because the target machine actively refused it.
The fact that I can connect with my LAN and not on the internet suggests that my ISP may be blocking port 1433. For this reason I tried to change the port my SQL Server instance was listening on but I have a feeling it isn't working.
Any help would be greatly appreciated as I've been stuck on this problem. Is there any way to test if my SQL server instance is actually listening on my custom defined port? Thanks in advance.
-Tom
View 1 Replies
View Related
Jun 28, 2007
Windows XP Pro - Sql Server 2005 Management Studio (current) - current visual foxpro oledb driver
I have an origin data folder with many foxpro dbf files
When I go through the "wizard" to import data from the origin folder using the "free table" option, I can locate the folder just fine. The form shows me a list of the files in the folder - but I cannot scroll through the list.
When I select the folder and continue, I test the connection and get a message that it is fine.
Then I go on to actually import tables. The list that is presented of tables that I can import does not include all the dbf files in the folder. There are 207 files in the origin folder, but only a fraction (about 120) of those show up in the list as candidates to be imported. I cannot see a pattern to the ones that are excluded from the list.
Does anyone know what could be causing this strange behavior?
Thanks.
View 3 Replies
View Related
Nov 13, 2007
This is a Execute DTS from VFP Example I found. Does anyone have a snippet for executing an SSIS package?
Thanks,
Shannon
*!* Create a DTS Package Object
dtsPkg=CREATEOBJECT('dts.package')
*!* LoadFromStorageFile() requires the following parameters:
*!* UNC path to the .DTS file to be executed
*!* User Password
*!* Load the package to be executed from a file.
dtsPkgName=dtsPkg.LoadFromStorageFile("\UNC_Path_toDTSPkgBeta.dts","User_Password")
*!* Execute the DTS Package
dtsPkg.Execute
*!* Release the DTS Package
RELEASE dtsPkg
View 1 Replies
View Related
Jan 30, 2007
Hello,
What permissions do I need to set on our new SQL Server 2005 test server so that I can see the stored procedures, views and tables from Visual Studio development environment.
Example, I can see my older SQL Server 7 tables, edit them, write stored procedures, and so on. But while I can see the SQL Server 2005 and its databases, the folder underneath are empty and I cannot right-click to create New stored procedure or table.
My guess is that there is security involved, if so, what do I set on the new server?
If I'm wrong, and it's something else entirely, please advise.
Thanks!
View 1 Replies
View Related
Jan 18, 2005
Hi,
I'm attempting to use the SQLExecute function to make a query to a SQL Server DB through ODBC.
However, the column I am trying to retrieve is called "date". When I try and query, I get back the message, "S0022: Invalid column name 'date'".
I believe I'm getting the error because date is a sql keyword (however if I run the query directly through SQL Interactive, I do not get a problem).
If anyone knows how I can get around this problem, that would be very helpful, as it is not possible to change the column name.
Thanks in advance.
Khalid.
View 7 Replies
View Related
Jan 12, 1999
We will be converting shortly from 6.5 to 7. We have a widely
used application that currently accesses the SQL 6.5 using SQL Server
odbc driver version 2.6
Will the 2.6 driver work with 7.0 and ff not, what will we have to do to
get it work with 7.0?
Thanks for the info.
Jerry Dunn
ViaHealth
jerry.dunn@viahealth.org
View 1 Replies
View Related
Aug 7, 2014
How can I add the option to import data from Visual FoxPro tables into SQL 2012 database?
View 0 Replies
View Related
May 1, 2006
Having installed SP1, my SSIS packages using the OLE-DB Provider for Visual Foxpro no longer work. Using the latest version obtained from here:
http://www.microsoft.com/downloads/details.aspx?FamilyId=E1A87D8F-2D58-491F-A0FA-95A3289C5FD4&displaylang=en
When attempting to create one SSIS from scratch, the message thrown is:
"The parameter is incorrect. (Microsoft OLE DB Provider for Visual FoxPro)."
The radio button option of "Copy data from one or more tables or views" and then selecting the "Next >" throw the error.
It has to be the SP1 causing the problem because nothing else changed on the Server and everything was working fine prior to this.
Microsoft, any feedback on this??
View 25 Replies
View Related
Oct 20, 2007
I am getteing
need help
Query analyzer error Unable to connect server local Msg17, level 16,state 1
ODBC SQL server driver [DBNETLIB]SQL server does not exist
View 6 Replies
View Related
Nov 23, 2006
Since my foxpro OLE driver has been rendered useless by service pack 1 for sql server 2005 I am forced to use the .net data provider for odbc.
I am importing a number of tables.. each time I add the DataReader Source to the dataflow and connected it to the OLE DB Destination I get a load of the good old "cannot convert between unicode and non-unicode string data types" errors...
So I'm having to do derived column transforms, for each and every column that it coughs up on.
Using expressions like (DT_STR,30,1252)receivedby to convert the "recievedby" column to a DT_STR,
Some of these tables have 100 string columns.. so I'm getting a bit sick of the drudgery of adding all these derivations...
Is there any way to tell this provider to stop deciding that the strings in the foxpro tables are unicode?
Thanks
PJ
View 3 Replies
View Related
Mar 1, 2006
Using the Import/Export Data Wizard, I'm trying to export a FoxPro 2.5 DOS (as dBase III) table of 15,000 records to SQL Server 2000. I keep getting this error message:
Insert Error, Column 32 ('PROG_START',DBTYPE_DBTIMESTAMP), Status 6: Data Overflow.
Invalid character value for cast specification.
I have SQL Server create the table each time I run the wizard. The new table allows NULLS in this column and I made sure to overwrite the empty date fields in the FoxPro table with blanks to make sure it would result in NULL. Originally SQL Server tried to put this as SMALL DATETIME, but when I got the message earlier, I changed it to DATETIME.
Any suggestions?
View 3 Replies
View Related
Nov 22, 2004
I'm having problem with an OpenQuery statement in stored procedure, which should be run on FoxPro linked server. I'm getting either an error messages or not the result I expected. I know that the problem is with WHERE part, without this part it works.
Here is the code:
-------------------------------------
DECLARE @LastDate datetime
SELECT @LastDate = MAX(DateChaged)
FROM tblPersonel
WHERE ACTIVE IN( 'A', 'T')
1. I tried:
SELECT * FROM OPENQUERY(FoxProLink, 'SELECT ACTIVE, EmpNumber FROM tblPersonel WHERE DateChanged >=''+@LastDate+''')
This line gives me an error msg:
Could not execute query against OLE DB provider 'MSDASQL'.
[OLE/DB provider returned message: [Microsoft][ODBC Visual FoxPro Driver]Operator/operand type mismatch.]
2. I tried to use CTOD() - FOXPRO function to convert character to date.
SELECT * FROM OPENQUERY(FoxProLink, 'SELECT ACTIVE, EmpNumber FROM tblPersonel WHERE DateChanged >=CTOD(''+@LastDate+'')')
-this doesn't give any error, but doesn't limit the result set as it should.
Thanks all.
View 2 Replies
View Related
Mar 10, 2005
I didn't want to maintain similar/identical tables in a legacy FoxPro system and another system with SQL Server back end. Both systems are active, but some tables are shared.
Initially I was going to use a Linked Server to the FoxPro to pull the FP data when needed. This works. But, I've come up with what I believe is a better solution. Keep in mind that these tables are largely static - occassional changes, edits.
I will do a 1 time DTS from FP into SQL Server tables.
I then create INSERT and UPDATE triggers within FoxPro.
These triggers fire a stored procedure in FoxPro that establishes a connection to the SQL Server and fire the appropriate stored procedure on SQL Server to CREATE and/or UPDATE the corresponding table there.
In the end - the tables are local to both apps.
If the UPDATES or TRIGGERS fail I write to an error log - and in that rare case - I can manually fix. I could set it up to email me from within FoxPro as well if needed.
Here's the FoxPro and SQL Server code for reference for the Record Insert:
FOXPRO employee.dbf InsertTrigger:
employee_insert_trigger(VAL(Employee.ep_pk),Employ ee.fname,Employee.lname,Employee.email,Employee.us er_login,Employee.phone)
FOXPRO corresponding Stored Procedure:
FUNCTION EMPLOYEE_INSERT_TRIGGER
PARAMETERS wepk,wefname,welname,weemail,WEUSERID,WEPHONE
nhandle=SQLCONNECT('SS_PDITHP3','userid','password ')
IF nhandle<0
m.errclose=.f.
IF !USED("errorlog")
USE tisdata!errorlog IN SELECT(1)
m.errclose=.t.
ENDIF
SELECT errorlog
INSERT INTO errorlog (date, time, program,source,user) ;
values (DATE(), TIME(), 'EMPLOYEE_INSERT_TRIGGER','nhandle<0 PARAMS: '+STR(wepk)+wefname+welname+weemail+WEUSERID+WEPHO NE,GETENV("username"))
IF m.errclose
USE IN errorlog
ENDIF
RETURN
ENDIF
nquery="exec ewo_sp_insertNewEmployee @WEPK ="+STR(wepk)+",@WEFNAME ='"+wefname+"',@WELNAME ='"+welname+"',@WEEMAIL ='"+weemail+"',@WEUSERID ='"+weuserid+"',@WEPHONE='"+wephone+"',@RETCODE =0"
nsucc=SQLEXEC(nhandle,nquery)
SQLDISCONNECT(nhandle)
IF nSucc<0
m.errclose=.f.
IF !USED("errorlog")
USE tisdata!errorlog IN SELECT(1)
m.errclose=.t.
ENDIF
SELECT errorlog
INSERT INTO errorlog (date, time, program,source,user) ;
values (DATE(), TIME(), 'EMPLOYEE_INSERT_TRIGGER','nSucc<0 PARAMS: '+STR(wepk)+wefname+welname+weemail+WEUSERID+WEPHO NE,GETENV("username"))
IF m.errclose
USE IN errorlog
ENDIF
ENDIF
RETURN
SQL SERVER Stored Procedure called from FOXPRO Stored Procedure
CREATE procedure ewo_sp_insertNewEmployee (
@WEPK int,
@WEFNAME char(20),
@WELNAME char(20),
@WEEMAIL char(50),
@WEUSERID char(15),
@WEPHONE char(25),
@RETCODE int OUTPUT
)
AS
insert into WO_EMP (
WE_PK,
WE_FNAME,
WE_LNAME,
WE_EMAIL,
WE_USERID,
WE_PHONE
)
VALUES (
@WEPK,
@WEFNAME,
@WELNAME,
@WEEMAIL,
@WEUSERID,
@WEPHONE
)
IF @@ERROR <> 0
BEGIN
SET @RETCODE=@@ERROR
END
ELSE
BEGIN
-- SUCCESS!!
SET @RETCODE=0
END
return @RETCODE
GO
View 2 Replies
View Related
Jul 29, 2006
I created an SQL database in Visual Studio 2005 Express Edition and would like to edit it in SQL Server Management Studio Express. The only databases listed in the Object Explorer of SQL Server MSE are the system databases (ones that are part of the SQL Server MSE).
If I dig through the directories, I can locate my database under the Visual Studio directory, but I am unable to open it. I get an error message stating, "There is no editor available for [my database]... Make sure the application for the file type (.mdf) is installed."
I'm sure that this is a ridiculously simple rookie mistake that I'm committing somehow, but I'm stumped. Any idea what I'm doing wrong?
View 3 Replies
View Related
Jul 23, 2005
Hi all,I have an existing application that checks a few things before itlaunches another application. One thing that the application needs tocheck is the subscription properties of both the local database and theremote (LAN) server.I've stumbled upon some properties but I am trying to fit in the lastones and I can't seem to find the right code to accomplish this... Cananyone shine a little light on this please ?The following code queries the SQL Server (remote) to get (some of) theproperties of the replicated database. What I would like to fit inafter the 'state' are the properties that you can retrieve with theEnumAllSubscriptions function. However, I can't seem to find the rightobject (sample code) to retrieve those (or I'm just overlooking theobvious)...Here is (part of) the code I'm using to query the publication on theremote server :Dim oMergePublication As SQLDMO.MergePublication2Dim oSubscription As SQLDMO.MergeSubscription2Me.lstPublications.ClearFor Each oReplicationDatabase InobjSQLSERVER.Replication.ReplicationDatabasesIf oReplicationDatabase.Name = Me.txtSQLServerDatabase.TextThenFor Each oMergePublication InoReplicationDatabase.MergePublicationsbFoundReplicated = TrueMe.lstPublications.AddItem "Database replicated as'" & oMergePublication.Name & "'"For Each oSubscription InoMergePublication.MergeSubscriptionsMe.lstPublications.AddItem " - subscriber:" & oSubscription.SubscriberMe.lstPublications.AddItem " - localDB :" & oSubscription.SubscriptionDBMe.lstPublications.AddItem " -state :" & GetReplStatus(oSubscription.Status)NextNext'For Each osubscriber In oReplicationDatabase.'NextEnd IfNextSet oReplicationDatabase = NothingSet oMergePublication = NothingAfter this, I also want to check the local DB (=pulled subscription)and show some of the properties (from EnumAllSubscriptions). Forexample to warn the user about the need to synchronise (last_updatedvalue)...Any help appreciated,Many thanksGB--Your eyes are weary from staring at the CRT. You feel sleepy. Noticehow restful it is to watch the cursor blink. Close your eyes. Theopinions stated above are yours. When I snap my fingers, you cannotimagine why you ever felt otherwise. <snap>
View 2 Replies
View Related
Aug 14, 2006
Hi there guys, I am currently trying to achieve a seemingly simple task in VC++ 2005. I have made a very simple form in Microsoft Access which I wish to serve as the beginnings of something greater. I created a db in MS Access named links.mdb containing on table-> Table1. Table1 contains 1 column, "Links", and i wish to read these strings into variables in my Visual C++ Windows Forms Application.
What I have done so far...
In Visual C++, I clicked on Data->Add new data source, and followed the wizard to add the microsoft access database to my application by the name, "linksDataSet". I can see the table in my left hand "Data Sources" pane in VC++. All I need to know is how to access my database from here so that I can read these strings stored in my table. Also, would be possible to schedule my application to log on to a http server and retrieve these links every time the application is executed? How would I go about doing this?
Thank you very much for your time
Regards
Linden.
View 5 Replies
View Related