Seeking BEST Method For SQL To MSAccess

Jul 12, 2004

I would like to pull some data from a SQLServer database, and save it into an Access MDB file (which can be empty to start). I would then zip up the MDB and download it to the user.





I am seeking advice on the most "elegant" or "efficient" way to do this. Here are some ideas I have been considering:





1) Should I start with an empty template MDB and file-copy it before I populate it? Or is there a neat way in ASP.NET to allocate a brand new MDB outright?





2) I could read the SQLServer data into a Dataset object. I could then open a connection to the MDB, create a table object, defining all the columns, etc., and then I could write the data to the new table object. BUT ... I have a hunch there is a nifty ADO.NET way to save the data already in the Dataset object right into the MDB (creating the table and columns as a matter of course) ... all with an instruction or two (or three). Any ideas?





Thanks in advance!

View 1 Replies


ADVERTISEMENT

Send Request To Stored Procedure From A Method And Receive The Resposne Back To The Method

May 10, 2007

Hi,I am trying to write a method which needs to call a stored procedure and then needs to get the response of the stored procedure back to the variable i declared in the method. private string GetFromCode(string strWebVersionFromCode, string strWebVersionString)    {      //call stored procedure  } strWebVersionFromCode = GetFromCode(strFromCode, "web_version"); // is the var which will store the response.how should I do this?Please assist.  

View 3 Replies View Related

Update Method Is Not Finding A Nongeneric Method!!! Please Help

Jan 29, 2008

Hi,
 I just have a Dataset with my tables and thats it
 I have a grid view with several datas on it
no problem to get the data or insert but as soon as I try to delete or update some records the local machine through the same error
Unable to find nongeneric method...
I've try to create an Update query into my table adapters but still not working with this one
Also, try to remove the original_{0} and got the same error...
 Please help if anyone has a solution
 
Thanks

View 7 Replies View Related

Seeking Help With A Query

Apr 28, 2008

Hello
I have this data in a Access DB of ~4500 posts.
Here is a sample of my problem.
The Name has no ID, it is a simple text field with ~1800 diferent names in it:
Year|Name|
-------------------
2005|NN|
2005|NN|
2005|YY|
2005|XX|
2006|XX|
2006|XX|
2006|XX|
2006|NN|
2006|NN|
2008|NN|
2008|NN|
2008|NN|

I have tried to make a SQL query to show this:
Count of each Name Grouped by year

Year|Name|Cnt
-------------------
2005|NN|2
2005|YY|1
2005|XX|1
2006|XX|3
2006|NN|2
2008|NN|3

and this:
All Name as total count in the DB
|Name|TotalCnt
------------
|NN|7
|XX|4
|YY|1

without any success.
All ideas are welcome at this point since i am stucked.

View 2 Replies View Related

Seeking Answer

Oct 17, 2007

1)Which statement shows the maximum salary paid in each job category of each department?_______
A. select dept_id, job_cat,max(salary) from employees where salary > max(salary);
B. select dept_id, job_cat,max(salary) from employees group by dept_id,job_cat;
C. select dept_id, job_cat,max(salary) from employees;
D. select dept_id, job_cat,max(salary) from employees group by dept_id;
E. select dept_id, job_cat,max(salary) from employees group by dept_id,job_cat,salary;

2)description of the students table:
sid_id number
start_date date
end_date date
which two function are valid on the start_date column?_________¡£
A. sum(start_date)
B. avg(start_date)
C. count(start_date)
D. avg(start_date,end_date)
E. min(start_date)
F. maximum(start_date)

View 3 Replies View Related

DTS Packages- Seeking Confirmation

Apr 8, 2008

Hello all,
I have 2 primary key fields the ssn and refnum... if the data in the file is duplicated it will not import to my table rights even though i am using DTS to do my import, correct? or do I need to add an extra validator in there?

View 2 Replies View Related

Attach Db ( Desperate Seeking For Help )

Apr 29, 2002

A database with 1 mdf and 2 ldf has been detached from SQL Server 7.0 . Then removed the log files ( they are gone , unable to recover ) and there's no backup at all . Now I want to attach the database with the same mdf , but got error msg - 'Device activation error'. It seems like it's looking for one of the log files.

Is there any way to recover the db ?

I guess NOT , isn't it ?

I don't understand why it doesn't work with sp_attach_single_file_db and sp_attach_db . I actually tested it with a dummy database with 1 log file , and it worked - a new log file was recreated. Thus I performed in production server. Don't understand why it doesn't work.


thanks in advance.

View 4 Replies View Related

Seeking For The Fast Query

May 11, 2004

Hello, everyone:

There is a big table with several million records. I am developing a query that retrieve the first rowset that meets WHERE condition. Any suggestions for the fast query? Thanks a lot.

ZYT

View 2 Replies View Related

Novice Seeking Advice With SQL 2000

Aug 10, 2007

Hello,
 I am asking a question i have seen many threads on, but I am looking for an idiot's guide on how to convert my SQL 2005 database to SQL 2000 so i can get it to run on my web hosting server. I'm very new to asp.net , but have ahd years of experience in normal HTML and a year or two in the old ASP.
 I was advised to learn ASP.Net 2.0 and have found it nothing but brilliant. The intergration with SQL 2005 made it a lot quicker to link up a database than using Access. Unfortunatly my hosting company is a little behind and still using SQL 2000. There isn't mch databse intergration (a few aplication forms) so I dont mind re-writing the whole database but I dont know how to set Visual web developer up with a SQL 2000 Database. I have also read from various other forums that you can convert a databse to 2000 by doing something with the scripts, but the explaination is too complicated for me to follow.
 Is there anyone out there who wouldn't mind going over some old ground and explain this all in simple terms? Im using 'SQL Server Managment Studio Express' (although i dont know how to use it) and 'Microsoft visual web developer 2005 express edition' .
 Thanks for reading this
 
Simon

View 6 Replies View Related

Seeking: Alternatives For Initiating SSIS

Feb 8, 2008

Hello all, I'm new to SSIS and this forum, and this is my first post.

We're migrating a 2000 DTS ETL process to 2005 SSIS. We really like the enhanced functionality of SSIS thus far.

One problem we have with our 2000 process is that runs at 1:00am each morning. The scheduling is done via a distributed scheduling tool called Maestro. Our process pulls data from a mainframe-based DB2 OLTP and reformats it into SQL Server reporting tables. We have nightly mainframe batch processing that updates the DB2 tables, and we need those updates on a nightly basis.

The mainframe batch process starts at 8:00pm each evening. It finishes normally by 1:00am 90% of the time, but it is 20+ years old, and has its share of problems, especially during month-end. The problems can't be resolved until the next business day in some cases.

We'd like to elegantly connect the two processes somehow so the SSIS ETL process kicks off when the mainframe batch process finishes. I intentionally didn't use the word 'trigger' up until this point.

It would not be a problem to modify the mainframe batch process to insert or update a DB2 table that SSIS has access to, but I don't think we can get the mainframe batch process to update SQL Server 2005 tables...?

Any advice would be greatly appreciated--TIA!

John

View 7 Replies View Related

Replication Scenario - Seeking Suggestion

Jul 2, 2007

I have two sites. Site A and Site B

Each site has two databases

Site A

Db1

Db2

Site B

Db1

Db2

Site A Db1 has to perform transaction replication to Site A- Db2 and Site B- Db1 and Db2.



I started Site A as pubisher and distributor and Site A and Site B both as subscriber.



Site B is in a different geographical area (state).



----------

Please suggest the best scenario to save bandwidth and server load for Publisher, and Distributor.



-------

Earlier I thought that I will implement local replication between Site B - in between Db1 and Db2. The Sql Server does not let me set Db1 as publisher, and distributor for its local database Db2.



-------

P.S. My all databases need same transactions though they are connected to different hardware at different places. So please don't question that why I need four similar databases.

View 7 Replies View Related

Upgrading To SQL 2005 From 2000 - Seeking Advice

Nov 30, 2007

Hello everyone, I am upgrading from SQL Server 2000 to SQL Server 2005. Any caveats? Can I just detach the db's and attach them into 2005. Or is there any conversion I should run or import first?

Thanks,

View 4 Replies View Related

Seeking Info On 2-node Active Passive Sql Setup

Jan 14, 2004

In desperate need of implementing a solution where the customer has purchased a CMS to replace their corporate site and wants to use MSSQL as the DB server type. I have 3 servers allocated to me to complete this and I could use some advice on the best setup.
THey're running windows 2003 standard server along with sql 2000 standard server. The intended plan is for the 2 servers to become web servers with the last server becoming the sql server. The CMS will reside soley on the sql server and the content for the web site on the seb server(s).
What I need to know is if it's possible to set up an active/passive node to accommadate this using the items mentioned above? From what I've been reading sql 2000 enterprise does clustering but I'm hoping this version of sql can be used for something.
Any responses are appreciated.

View 5 Replies View Related

Seeking Testing Volunteers W2K MTS/DTC To VMS DECdtm Distributed 2PC Transactions

Jul 20, 2005

Hi,I am seeking the help of volunteers to test some software that I'vedeveloped which facilitates distributed two-phase commit transactions,encompassing any resource manager (e.g. SQL/Server or Oracle) controlled byMicrosoft's Distributed Transaction Coordinator in a Windows2000environment, with any resource manager under the control of DECdtm (e.g. Rdb(or Oracle via the XA Veneer)) in a VMS environment.[Yes, at some stage, I hope to sell this software and make money out of it,so unless you have a large philanthropic streak or are simply a techie wholikes to stay on top of Windows<->VMS connectivity issues, then you may wishto look away now. But if you do choose to participate, then rest assuredthat I have no interest in your personal or company details. (Just yourwork-rate :-)]What differentiates my Transaction Manager software from existingTransaction Monitor packages that are already in the marketplace (and whyyou should be interested) is that it is based on the Transaction InternetProtocol TIP standard. (RFC 2372) For those of you who don't know, thebeauty of TIP's "Two-Pipe" strategy is it's application-pipe (or middleware)neutrality. Whereas most XA implementations mandate homogenous TransactionMonitor deployments (such as Tuxedo everywhere, Encina everywhere, MQSerieseverywhere, ACMSxp everywhere and so on . . .), hotTIP from TIER3 Softwaregives you complete freedom to choose the middleware product(s) that bestsuite your particular application and heterogeneous network needs.Would you like to talk to VMS with TIER3 Sockets, COM or DCE/RPC? BEAMessageQ, IBM MQSeries or HTML? The choice is yours and yours alone. Butonce you realize that you need to encase your critical transactions withinthe ACID properties of a true Heterogeneous Two-Phase Commit then you willcome to the conclusion that you need a Transaction Manager that looks a lotlike this.Another drawback of traditional "One-Pipe" strategies is that they precludethe run-time determination of transaction participants. (Functionalitywhich may be advantageous in a wide-area or Internet based application.)Anyway, this is what I have: -On the Windows side, you need absolutely *NO* additional software! I'llreply to this note with a brief description of the COM+ and DTC functionsthat you would need to invoke in order to successfully push a MTS/DTCtransaction to VMS. NB: These are standard Windows APIs that are fullydocumented on MSDN.On the VMS side, I have a VMSINSTAL saveset that (all zipped up) is some150KB that I'm happy to e-mail to you along similar lines to the VMShobbyists (non-commercial use) license. I'll reply to this note with anInternet Daemon (INETd) example of code that uses my software to cedetransactional control, over an SQL insert into a Rdb database, to MTS/DTC.It's under 500 lines long and contains all of the DCL, 3GL, SQL required toproduce a working example of a TIP-2PC capable TCP/IP auxiliary server. Thisexample will insert a row into the MF_PERSONNEL.Employees table on the VMSside in co-operation with Windows2000 MTS/DTC client that is inserting a rowinto the NORTHWIND.Employee table. Commit them all or roll them all back.So, in summary, If you'd like to volunteer to put hotTIP through it's pacesthen simply reply to this mail.Regards Richard MaherPS. The following are a few functionality restrictions with the currentversion of my software that may effect your decision to participate: -1) Transaction has to be started/mastered/coordinated by W2K MTS/DTC2) Transactions cannot be PULLed from VMS and must be PUSHed from W2K3) No cluster-wide recovery.(If a txn falls over after being prepared then you have to wait for thatspecific node to become contactable again even though that lovely RDMrecovery job is sitting on another node protecting the database until myhotTIP TM tells it to commit or abort.)4) There is currently no Alpha or Itanium version available. The Alpha portis currently in progress but, for the time being, you'll either need a VAXor a VAX emulator on your PC.

View 7 Replies View Related

Horizontal Variety Seeking Association Rule Problem

Jul 13, 2006

I read somewhere that market basket analysis finds rules with substitutes as likely as rules with complements due to a consumer behavior called "horizontal variety seeking". This is when customers buy more than one product in the same category even though they are subsitutes. For example, when people go to the grocery store and buy soda, they buy coke and sprite at the same time even though they are substitutes of each other. I was wondering if anyone has experience with this anomaly and how they solved it. I found a time series model called the vector autoregressive model which is used to find the elasticity of prices over a time period. Does anyone have experience working with the VAR model? I am having trouble figuring out what some of the variables in the model are.

Below is the paper

http://www.feb.ugent.be/fac/research/WP/Papers/wp_04_262.pdf#search='VAR%20model%20market%20basket%20analysis'

View 1 Replies View Related

Seeking Advice On Converting Crystal Reports To SSRS

Aug 20, 2007

Hi. We've decided to convert our Crystal Reports to SSRS 2005. We know (thanks to this forum) there are companies that will convert the reports at a cost; however, we'd like to undertake this ourselves. Are there resources you can point us to that might be specific for Crystal Reports users coming over to SSRS, especially for newbies? Thank you.

View 3 Replies View Related

Insert A Jpeg Into A Column Sql Server 2000 - Desperately Seeking Help

Jul 20, 2005

I'm a complete newbie. Need to insert a Company logo into a databasecolumn to use later on in a check printing application. Read how toinsert the pointer instead of the object into the column. Below iswhat I did:SET QUOTED_IDENTIFIER OFFGOINSERT INTO BankInfo(CoLogo) VALUES(0xFFFFFFFF)***Then I did this****DECLARE @Pointer_Value varbinary(16)Select @Pointer_Value = TEXTPTR(CoLogo)FROM BankInfoWHERE CMCo = '91'WRITETEXT BankInfo.CoLogo @Pointer_Value"\192.31.82.77DataCheckImagesWyattLogo.jpg"****This was straight out of a book and it seemed to work it gave me amessage that it was successful and when I view the data in the columnI can see the pointer0x453A5C436865636B496D616765735C57796174744C6F676F 2E6A7067*****But when I try to use the column in either Crytal Report or an AccessReport the Bank Logo does not show up. I also placed the logo on my Cdrive and tried pointing to it there with "C:WyattLogo.jpg" with nosuccess.It can't be this difficult to get a Company logo into a column. Idesperately need assistance. Remember I am the ultimate newbie. Ilooked at my first sql database last week. Thanks in advance for anyhelp, it is appreciated.

View 1 Replies View Related

Seeking Correct Syntax To Pass A NULL Value For A Datetime Field From An Asp Page To SQL

Jan 13, 2006

Hello,I've been searching the web for quite some time to resolve the problemof "1/1/1900" returning in a datetime field in SQL that resulted from ablank (not NULL) value being passed to it through an ASP page.The solution is that a NULL value needs to passed to SQL from ASP.Thats fine...I understand the why the problem is happening and thesolution around it. HOWEVER, I can't seem to get the proper syntax towork in the ASP page. It seems no matter what I try the "1/1/1900"still results. Below are a few variations of the code that I havetried, with the key part being the first section. Does anyone have anysuggestions?!?!?______________cDateClosed = ""If(Request.Form("dateClosed")= "") ThencDateClosed = (NULL)end ifsql="UPDATE rfa SET "&_"dateClosed='"& cDateClosed &"', "&_"where rfaId='"& Request.Form("RFAID")&"'"_____________________________cDateClosed = ""If(Request.Form("dateClosed") <> "") ThencDateClosed = (NULL)end ifsql="UPDATE rfa SET "&_"dateClosed='"& cDateClosed &"', "&_"where rfaId='"& Request.Form("RFAID")&"'"_____________________________cDateClosed = ""If(Request.Form("dateClosed")= "") ThencDateClosed = NULLend ifsql="UPDATE rfa SET "&_"dateClosed='"& cDateClosed &"', "&_"where rfaId='"& Request.Form("RFAID")&"'"_______________Thanks in advance!!!!

View 7 Replies View Related

SEEKING BASIC INFO ON SQLAgent - TSQL Jobstep Type Program_name(s)

May 16, 2008



I'm trying to ascertain how I can find out more about a particular job.

The information I have from a script I have to identify deadlock root causes gave me back this information:
spid 86 is blocking spid 51... spid 86 info: SQLAgent - TSQL JobStep (Job 0xBAD836E3D331B44BA4CCAC400D244B17 : Step 1)

Well, that's good to know, but I would like to be able to identify the particular job that 'owns' TSQL JobStep (Job 0xBAD836E3D331B44BA4CCAC400D244B17 : Step 1).

I've read the BOL on the sysjob type tables; and, while they tell me about the columns in the tables and what they are, they tell me absolutely nothing about how one goes about figureing out what I want to know.

I suspect one problem I have is that '0xBAD836E3D331B44BA4CCAC400D244B17' needs converting to something else and I have no idea how to go about doing this. I was never that good at converting hex (I assume that is what this is) when I was doing it rather often, which is years ago, so I really have no idea how to start.

Can anyone throw me a lifeline here?
Tia
randyvol

View 2 Replies View Related

MSACCESS TO SQL ERVER

Aug 6, 1998

Can any body tell me the step by step procedure of porting MSACCESS tables into
SQL SERVER

thanks in advance

Rakesh

View 2 Replies View Related

MSAccess -----&> SQL Server

May 21, 2004

I'm using MSAccess 2k as a front end to a SQL Server 2k database.

I have a user set up in SQL Server to be database owner for a specific database.

Using NT authentication.

Using ADO.

The MSAccess application executes a store procedure on the SQL Server that (1) deletes a tables if it exists, (2) creates and populates a table (the owner shows up in Enterprise Manager as the user name) and then (3) uses the table (read) in a join to do some other processing.

The (1) delete works fine.
The (2) table is created and populated fine.
On (3) the Select (inner join) to do the aditional processing I get an error message that the table name used is an invalid object.

Workaround.
If I create the table as sa separately and in the store procedure, instead of deleting, creating and populating the table I merely truncate the table and then repopulate it, everything works fine.

I would prefer to not have the table sitting around the database all the time.

Anyway, I'd like to figure out why the table is causing a problem.

Any ideas?

Thanks.

View 1 Replies View Related

SQL Jobs And MSACCESS

Jan 16, 2006

Hi!!

I´m having a problem setting up a job in sql.
When i run my DTS is on succed but when I schedule the job --failed
Is connecting a sql serve db with msaccess you.

Sombody know? if i have to consider something??

View 2 Replies View Related

SQL Server To MSAccess

Mar 28, 2008



Hi,

I am getting below error when exporting data from SQL Server 2005 to MS Access.

[DTS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "OLE DB Destination" (1706) failed with error code 0xC0202009. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.

Its direct mapping from OLE DB Source (SQL Server 2005) to OLE DB Dest (MS-Access Database)

Help from anyone. Plz its urgent.

Regards,

View 3 Replies View Related

MSAccess Adp Bit Datatype Problem

Apr 28, 2004

Hi there,

We have a MSSQL 2000 db, with several MSAccess 2000 adp interfaces connected to it.

Several bit data type fields of the tables are updated through those interfaces, but from time to time (I can find no pattern when it happens), flagged fields (i.e. with value 1) are unflagged (they get value 0), without any user interaction on that field (neither in the tables, neither through the checkboxes).

Anybody familiar with this issue?

View 1 Replies View Related

MSAccess SQL Aggregate F(x) Vs. SQLServer

May 28, 1999

The following works fine in Access:

SELECT Hist_POS.POSITION_CLASS_CODE, First(Hist_POS.POSITION_TITLE) AS FirstOfPOSITION_TITLE INTO [Manhour Positions]
FROM Hist_POS
GROUP BY Hist_POS.POSITION_CLASS_CODE
ORDER BY Hist_POS.POSITION_CLASS_CODE;

But not SQLServer because of First(). How can I achieve the same results in SQLServer?

Thanks

View 1 Replies View Related

Accessing MSAccess From SQL Server

Dec 22, 2004

hi,
I have MS Access Database (test.mdb), and i have a table called tblEmployee in that.
How to query the table from SQL Server Query Analyser?


Thanks in advance
qAnand

View 1 Replies View Related

MSAccess And MS SQL Remote Access

Mar 18, 2004

I am having issues with MSAccess and MS SQL for a new client. It worked in the past, but I cannot talk to the old computer guy?!# Here's the scoop. It uses an Access front end and ODBC to conect to the MS SQL 7.0 server. In the office they use a system DSN named DATA to connect using NT authentication. I've got the firewall configured for the two employees static ip addresses to goto the MS SQL server. On the remote machines, I have added a system DNS named DATA as well that uses MS SQL authentication. I setup the remote user accounts on the MS SQL server. Now heres the problem. I can test the ODBC from the remote omputer and it works.At first I could not get into teh database at all. I went in and updated the Access file connection strings to include a username and password. Now I can get into the Access front end and access the main page. (IT has a couple of buttons - Shpping, Inventory, Management, etc.) I can even click on these buttons and pull up the next page. (For example I can click on the management button and pull up a list of new buttons- one of which is Auto Exec Bob) NOw when I click autoexec bob or any of the others it takes a while and then give me an error. (SQLState 28000 MS SQL error: 18452 Login failed for user null. Reason: Not associated with a trusted SQL Server Connection.) If I click ok then I have a box that lets me uncheck the use trusted connection and sign in using my remote username and pass that I setup. Eventually I can access everything - one step at a time.Each time it tries to connect to the database it takes about thirty seconds to time out, then gives me this error message and I can log on again. Any help to sort this out would be greatly appreciated. Thanks in advance.

View 1 Replies View Related

Migrating From MSAccess To Sql Express

May 30, 2006

Hitaishi writes "We have recently migrated from MSAccess as our back end system to SQL Express, but the dialogs showing records of the table which were taking lesser time in Access are taking more time in opening and doing any database operations.......

We are using .Net Framework 2.0. Does it have anything to do with lowering down the performance ?

Any help would be appreciated."

View 1 Replies View Related

Migration From MsAccess To Sql-Server

Jan 26, 2007

Migration from MsAccess to Sql-Server.

Problem:

Ing_ID = nz(me.Ing_AutoNr,0)
me.openform "MyForm",,,"ID = " & Ing_ID

This work in MsAccess with new records but this doesn't work in Sql-Server. How can I solve this?

View 1 Replies View Related

Upsizing From MSAccess To SQLServer

Apr 26, 2006

I am trying to use SQLServer for the first time and I am trying to use the upsizing wizard on Access to get moved over to SQLServer. I am getting the following error messages:

Connection failed:

SQLState: '01000'

SQL Server Error: 2

[Microsoft][ODBC SQL Server][Shared Memory]ConnectionOpen (Connect()).

Connection failed:

SQLState: '08001'

SQLServer Error: 17

[Microsoft][ODBC SQL Server][Shared Memory]SQL Server does not exist or access denied.



Does anyone know how I should proceed? ( I am new at this so please be gentle.) Any help would be appreciated.

Thanks

View 3 Replies View Related

Msaccess Connection To Sql 2000

Mar 8, 2007



im in the begginging stages of converting an access 2003 backend to SQL 2003sp3.

The access's upgrade wizzard did an ok job getting most of the tables ported over. Now when the frontend relinked the tables to SQL server im assuming i just continue on using them as is. When the wizzard wanted a connection to use i created a new connection and saved it on the server. Im assuming this connection object is what access is using to get to SQL.

Am i assuming correctly ?

The reason i ask is only a few of the linked tables in to sql seem to be editable. some are read only ? (i have primary keys in all my tables.) im just calling a query bound to the linked tables.

Secondly, But could be related.

Now this problem i dont understand. On open of my main form i log who and what pc they are using. in this situation i open a record set, log the data and close it. At first the error was i needed to add dbSeeChanges on my object, ok so i added it as an option.

But i now get an the error message: at rsTran.AddNew "Run Time error: 3027 , Can Not update. Database or Object is read Only ?



here is the code

Set db = CurrentDb
Set rsTran = db.OpenRecordset("tblUserLog", dbOpenDynaset, dbSeeChanges)
struser = Currentuser
strNetwork = atCNames(1)
strPC = atCNames(2)


rsTran.AddNew
rsTran("UserName") = struser
rsTran("MachineName") = strPC
rsTran("EmployeeNum") = strNetwork
rsTran("Notes") = "User Logon"
rsTran.Update


Set db = Nothing
Set rsTran = Nothing

thank for any advice.

jon

View 1 Replies View Related

Conversion MSAccess -&&> SSCe

Dec 6, 2006

We have plan to migrate our database from Access to SqlCe.

Here our situation:

We will never use a Pocket PC applications, only Windows desktop application.
We want to migrate the .mdb file to a .sdf file (I've seen the ADS application, but since we don't use mobile devices, it's no use)
The .sdf will be use on local client machine only.
Here's my problems:

I've use a conversion to migrate from access (http://www.primeworks-mobile.com/Downloads/DPW.html) and seem to work fine.
I updated the source code to use the SqlServerCe dll instead of OleDB.
Some of my queries work fine, but others just won't work in VS2005 using C#.

To check if the query is really wrong, I take exactly the same query and put it Query Builder from the Server Explorer in VS2005.
And the query just work fines!!! It's bring back all the records asked for, and I've got an error for the same query from my source code.

I'm using a datatable, here's the code used for filling the DataTable. I've got an error on the line adapter.FillSchema()






string connectionString = @"Data Source=" + fic_parent.CheminFichierComplet;
using (SqlCeConnection connection = new SqlCeConnection(connectionString))
{
SqlCeDataAdapter adapter = new SqlCeDataAdapter();

connection.Open();

SqlCeCommand command = new SqlCeCommand(requete, connection);

command.CommandType = CommandType.TableDirect;
adapter.SelectCommand = command;

tableResultats = new DataTable();
adapter.FillSchema(tableResultats, SchemaType.Source);
adapter.Fill(tableResultats);

// Close connection
connection.Close();
}



Error is:

Message="The specified table does not exist. [ (...) ]"
Source="SQL Server 2005 Everywhere Edition ADO.NET Data Provider"
HResult=-2147217865
NativeError=0

Here my questions:

Is it possible to have an application that will convert my Access databases to an SSCe .sdf file ?
Why I can query in Server Explorer and can't in my source code using the same sql statement ?

At which level my code isn't good, because I just replace all OleDB* --> SqlCe* in my code.
I hope that I explain clearly my problem, do not hesitate to ask me questions about this problem.

View 8 Replies View Related

Exporting From SQL Server To MSACCESS

Jul 10, 2006

Hi,

I Need to make a script or task that programmatically export data from SQL Server to Access File , and how to call the script from the .NET?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved