Showing posts with label accessed. Show all posts
Showing posts with label accessed. Show all posts

Sunday, March 25, 2012

Automatically export foxpro data to an xml file

I'm not sure if this is the correct place to post this, so I apologize
if it isn't.
I have a foxpro table that needs to be accessed by the web, but I don't
really want to access it with odbc unless I have to. I'd rather just
export the data once a night and read it from that exported file.
My questions is this: Is there a program out there that will export a
foxpro table to an xml file like once a night (or at any specified
interval)?
Any other solutions somebody can think of would be helpful. Thanks!Luke.Visinoni@.gmail.com wrote:
> I'm not sure if this is the correct place to post this, so I apologize
> if it isn't.
> I have a foxpro table that needs to be accessed by the web, but I don't
> really want to access it with odbc unless I have to. I'd rather just
> export the data once a night and read it from that exported file.
> My questions is this: Is there a program out there that will export a
> foxpro table to an xml file like once a night (or at any specified
> interval)?
> Any other solutions somebody can think of would be helpful. Thanks!
>
Since this is a SQL Server newsgroup, I'll suggest a SQL Server
solution... :-)
You could setup a linked server between SQL and your Foxpro database,
and then use a scheduled SQL job to export the data from Foxpro to an
XML file. Or just let your web site connect to SQL like the rest of the
world does.|||How would I set up a linked server?
Tracy McKibben wrote:
> Since this is a SQL Server newsgroup, I'll suggest a SQL Server
> solution... :-)
> You could setup a linked server between SQL and your Foxpro database,
> and then use a scheduled SQL job to export the data from Foxpro to an
> XML file. Or just let your web site connect to SQL like the rest of the
> world does.|||Luke.Visinoni@.gmail.com wrote:
> I'm not sure if this is the correct place to post this, so I apologize
> if it isn't.
> I have a foxpro table that needs to be accessed by the web, but I don't
> really want to access it with odbc unless I have to. I'd rather just
> export the data once a night and read it from that exported file.
> My questions is this: Is there a program out there that will export a
> foxpro table to an xml file like once a night (or at any specified
> interval)?
> Any other solutions somebody can think of would be helpful. Thanks!
>
Since this is a SQL Server newsgroup, I'll suggest a SQL Server
solution... :-)
You could setup a linked server between SQL and your Foxpro database,
and then use a scheduled SQL job to export the data from Foxpro to an
XML file. Or just let your web site connect to SQL like the rest of the
world does.|||How would I set up a linked server?
Tracy McKibben wrote:
> Since this is a SQL Server newsgroup, I'll suggest a SQL Server
> solution... :-)
> You could setup a linked server between SQL and your Foxpro database,
> and then use a scheduled SQL job to export the data from Foxpro to an
> XML file. Or just let your web site connect to SQL like the rest of the
> world does.|||Luke.Visinoni@.gmail.com wrote:
> How would I set up a linked server?
> Tracy McKibben wrote:
>
Try to look up sp_addlinkedserver in Books On Line - that will get you
started.
Regards
Steen Schlter Persson
Databaseadministrator / Systemadministrator|||Luke.Visinoni@.gmail.com wrote:
> How would I set up a linked server?
> Tracy McKibben wrote:
>
Try to look up sp_addlinkedserver in Books On Line - that will get you
started.
Regards
Steen Schlter Persson
Databaseadministrator / Systemadministrator|||Hi Luke,
First, make sure you have the latest FoxPro and Visual FoxPro OLE DB data
provider, downloadable from msdn.microsoft.com/vfoxpro/downloads/updates.
To set up a linked server in SQL Server Management Studio's Object Explorer:
ServerName > Server Objects > Linked Servers > Right Click - New Linked
Server. In the dialog here's what I have:
Linked Server: LinkedServerNameHere
Provider: Microsoft OLE DB Provider for Visual FoxPro
Product Name: Visual FoxPro 9
Data Source: "C:\Program Files\Microsoft Visual FoxPro
9\Samples\Northwind\Northwind.dbc"
Provider String: VFPOLEDB.1
For the data source, if there is a DBC file present point directly to the
DBC file. If there is no DBC present just point to the directory where the
DBFs are located.
To access the data use code like:
Select Customers.* From LinkedServerNameHere...Customers
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
cindy@.cindywinegarden.com
<Luke.Visinoni@.gmail.com> wrote in message
news:1150833731.102678.204090@.c74g2000cwc.googlegroups.com...
> How would I set up a linked server?
> Tracy McKibben wrote:
>|||Hi Luke,
First, make sure you have the latest FoxPro and Visual FoxPro OLE DB data
provider, downloadable from msdn.microsoft.com/vfoxpro/downloads/updates.
To set up a linked server in SQL Server Management Studio's Object Explorer:
ServerName > Server Objects > Linked Servers > Right Click - New Linked
Server. In the dialog here's what I have:
Linked Server: LinkedServerNameHere
Provider: Microsoft OLE DB Provider for Visual FoxPro
Product Name: Visual FoxPro 9
Data Source: "C:\Program Files\Microsoft Visual FoxPro
9\Samples\Northwind\Northwind.dbc"
Provider String: VFPOLEDB.1
For the data source, if there is a DBC file present point directly to the
DBC file. If there is no DBC present just point to the directory where the
DBFs are located.
To access the data use code like:
Select Customers.* From LinkedServerNameHere...Customers
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
cindy@.cindywinegarden.com
<Luke.Visinoni@.gmail.com> wrote in message
news:1150833731.102678.204090@.c74g2000cwc.googlegroups.com...
> How would I set up a linked server?
> Tracy McKibben wrote:
>

Automatically export foxpro data to an xml file

I'm not sure if this is the correct place to post this, so I apologize
if it isn't.
I have a foxpro table that needs to be accessed by the web, but I don't
really want to access it with odbc unless I have to. I'd rather just
export the data once a night and read it from that exported file.
My questions is this: Is there a program out there that will export a
foxpro table to an xml file like once a night (or at any specified
interval)?
Any other solutions somebody can think of would be helpful. Thanks!Luke.Visinoni@.gmail.com wrote:
> I'm not sure if this is the correct place to post this, so I apologize
> if it isn't.
> I have a foxpro table that needs to be accessed by the web, but I don't
> really want to access it with odbc unless I have to. I'd rather just
> export the data once a night and read it from that exported file.
> My questions is this: Is there a program out there that will export a
> foxpro table to an xml file like once a night (or at any specified
> interval)?
> Any other solutions somebody can think of would be helpful. Thanks!
>
Since this is a SQL Server newsgroup, I'll suggest a SQL Server
solution... :-)
You could setup a linked server between SQL and your Foxpro database,
and then use a scheduled SQL job to export the data from Foxpro to an
XML file. Or just let your web site connect to SQL like the rest of the
world does.|||How would I set up a linked server?
Tracy McKibben wrote:
> Since this is a SQL Server newsgroup, I'll suggest a SQL Server
> solution... :-)
> You could setup a linked server between SQL and your Foxpro database,
> and then use a scheduled SQL job to export the data from Foxpro to an
> XML file. Or just let your web site connect to SQL like the rest of the
> world does.|||Luke.Visinoni@.gmail.com wrote:
> How would I set up a linked server?
> Tracy McKibben wrote:
>> Since this is a SQL Server newsgroup, I'll suggest a SQL Server
>> solution... :-)
>> You could setup a linked server between SQL and your Foxpro database,
>> and then use a scheduled SQL job to export the data from Foxpro to an
>> XML file. Or just let your web site connect to SQL like the rest of the
>> world does.
>
Try to look up sp_addlinkedserver in Books On Line - that will get you
started.
Regards
Steen Schlüter Persson
Databaseadministrator / Systemadministrator|||Hi Luke,
First, make sure you have the latest FoxPro and Visual FoxPro OLE DB data
provider, downloadable from msdn.microsoft.com/vfoxpro/downloads/updates.
To set up a linked server in SQL Server Management Studio's Object Explorer:
ServerName > Server Objects > Linked Servers > Right Click - New Linked
Server. In the dialog here's what I have:
Linked Server: LinkedServerNameHere
Provider: Microsoft OLE DB Provider for Visual FoxPro
Product Name: Visual FoxPro 9
Data Source: "C:\Program Files\Microsoft Visual FoxPro
9\Samples\Northwind\Northwind.dbc"
Provider String: VFPOLEDB.1
For the data source, if there is a DBC file present point directly to the
DBC file. If there is no DBC present just point to the directory where the
DBFs are located.
To access the data use code like:
Select Customers.* From LinkedServerNameHere...Customers
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
cindy@.cindywinegarden.com
<Luke.Visinoni@.gmail.com> wrote in message
news:1150833731.102678.204090@.c74g2000cwc.googlegroups.com...
> How would I set up a linked server?
> Tracy McKibben wrote:
>> Since this is a SQL Server newsgroup, I'll suggest a SQL Server
>> solution... :-)
>> You could setup a linked server between SQL and your Foxpro database,
>> and then use a scheduled SQL job to export the data from Foxpro to an
>> XML file. Or just let your web site connect to SQL like the rest of the
>> world does.
>

Sunday, February 12, 2012

Auto Incrent Attribute Sql Server 2005

In our application we use the ADODB.Recordset.

In SQL server 2000

If there was a view that joined 2 tables and I accessed the view the 2 ID fields in the view would still have the AutoIncrement attribute still set to true so that I knew those were Identity fields.

In SQL server 2005

I dont' know why but if you reference a View that has Identiy AutoInc fields in ADO it doesn't keep those properties.

Also for whatever reason we Set the ID field to 0 to let ourselves know its a new Record. SQL 2000 let it happen and assumed it to be null where as By Setting the ID to 0 in SQL 2005 causes it to blow up on me.

Is there some sort of setting in SQL that can make SQL 2005 work like SQL 2000 in these two instances...

CREATE TABLE [dbo].[table1](
[field1] [int] IDENTITY(1,1) NOT NULL,
[field2] [varchar](15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[field3] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
CONSTRAINT [PK_table1] PRIMARY KEY CLUSTERED
(
[field1] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

above example sql script create table with auto incrent. field (field1)

note: IDENTITY(1,1) keyword.

argument of IDENTITY indicate start and inc. value respiectivey.

Auto Incrent Attribute SQL Server 2000 vs Sql Server 2005

In our application we use the ADODB.Recordset.

In SQL server 2000

If there was a view that joined 2 tables and I accessed the view the 2 ID fields in the view would still have the AutoIncrement attribute still set to true so that I knew those were Identity fields.

In SQL server 2005

I dont' know why but if you reference a View that has Identiy AutoInc fields in ADO it doesn't keep those properties.

Also for whatever reason we Set the ID field to 0 to let ourselves know its a new Record. SQL 2000 let it happen and assumed it to be null where as By Setting the ID to 0 in SQL 2005 causes it to blow up on me.

Is there some sort of setting in SQL that can make SQL 2005 work like SQL 2000 in these two instances...

CREATE TABLE [dbo].[table1](
[field1] [int] IDENTITY(1,1) NOT NULL,
[field2] [varchar](15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[field3] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
CONSTRAINT [PK_table1] PRIMARY KEY CLUSTERED
(
[field1] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

above example sql script create table with auto incrent. field (field1)

note: IDENTITY(1,1) keyword.

argument of IDENTITY indicate start and inc. value respiectivey.