I have a form which contain some textfields and one attachment(type="file"). I am using MS Access 2010. When i am trying to insert form data into database i am getting error like An INSERT INTO query cannot contain a multi-valued field.I tried a lot and searched a lot but i couldn't figure out. I am able to do it using asp.net. But, My server supports only classical asp. Can anyone have any idea about this.
I don't believe you can make use of an MS Access attachment field using ADO. I believe you need to use DAO or ADO.Net. And I don't think DAO or ADO.net are available in Classic ASP.
Edit: I agree with Hansup, that you might be able to use DAO in VBScrip/Classic ASP but I'm finding it very difficult to find any information or examples. Here's a list of constants but this is for an older version of DAO. http://include.wutils.com/com-dll/constants/constants-DAO.htm
Related
To give you the question first: I want to know if it is possible to create a stored procedure or something in SQL Server that intercepts and translates SELECT, INSERT, and UPDATE commands. Now for the explanation:
I am writing a web application to replace an old desktop app. Its a business app which is basically a database interface with reports and searches and all the good ol' CRUD. The new and old apps need to live in harmony together since some customers may be using the old and new together to access the same DB.
My problem is that the original database format stores most data in a single blob of text (1 nvarchar(MAX) field). I want to add functionality to search on fields stored in the blob, but it will be cumbersome and slow. I would like to update the database format without changing the desktop app at all, hence the question above.
It occurs to me that I could do this on the client by writing a wrapper class for the data access object and then do a bulk replace in the client code to reference the wrapper, but I want to know what my options are on the server as well.
In case anyone wants to know, the old app is in VB6 and the new in C#.
EDIT
Alright, so it looks like if I do anything on the server side we are looking at adding stored procedures and then updating the client VB6 code to reference the stored procs. Do something like a bulk replace of SELECT with sp_oldselect ... To return the data in a different format. I'm guessing a client-side wrapper would be the best solution for the time-being. Old apps die hard.
You can create a bunch of views for the old client and let it to query those views. It will be slow as hell in most cases, but it can 'replace' the select query. For updates and insert.. well.. instead of triggers on the views could help is some cases, but it will require lots of processing.
However my suggestion is to provide exactly the same functionality in the web app and deprecate the desktop app. When the desktop app's share is low enough, stop supporting it. From this point, you are (mostly) free to add new functions, upgrade the database schema, etc.
I agree with JonH, that alot can go wrong here, but you can try and read up on the INSTEAD OF Triggers in MS SQL server here: https://technet.microsoft.com/en-us/library/ms179288(v=sql.105).aspx
So I am looking to freshen up my dev skills. I come from a classic ASP background using VB, so this new .net and Model concept is very foreign to me. I cant seem to get my head wrapped around it yet. I have tried going through the tutorials, but most are C# and I plan to use VB.net.
My needs at the moment are very simple (or at least i thought they were) Does anyone have a simple example or explanation of how I can create a simple page that pulls data from a local SQL Express DB?
I understand how the Controllers and Views work(mostly), but the Models just make zero sense to me
I created a new Model for a very simple database called Test. It has only 5 columns. (Username, Password, Email_Address, Text_number, and UserID (UID). It created a Model1.edmx, but that's it. Nothing else below it. Where the heck do I go from here?
Uggghhh I feel so dumb!! I used to be OK at this, now it's SOOO different!! I miss my T-SQL, Recordsets, and Loops.
If you want db first you should create a new .edmx Model using "generate from database".
When you have created an .edmx model then you usually create your Entity Classes (see tutorials below) with the "add code generation item". You can read about this in one of the linked tutorials, under "Generating Strongly Typed Entity Classes". After that you're ready to go the controller and create your first query to return some data.
I suggest you start watching these free tutorials about MVC3/4, even if they are in C# and you want to use vb.net, I'm sure you can easily understand what's going on since it's clearly explained
http://www.asp.net/mvc/pluralsight
also read these tutorials that show database first approaches
http://msdn.microsoft.com/en-US/data/jj206878
http://msdn.microsoft.com/en-us/data/gg685489.aspx - VB.net project
To connect to your database, you might want to consider an ORM, like one of the following:
Entity Framework
NHibernate
Linq2Sql (built-in/already installed)
Each of these are very popular and make it easy to quickly snap a code-wrapper around your DB. Then, in your model, you use the ORM objects(wrapping your DB) to call through to the DB.
I'm in the unlucky situation where my client requires to use a read-only MS Access database to render some webpage contents on his website (built by me).
Because this MS Access file will be updated roughly once per month and I don't want to do it manually by converting it into sql query and import in Mysql, I would like to make some webpages read directly from it.
What I discovered is that there isn't a driver (at least in my cakephp installation) for MS Access database (but in older versions of cake exist) or at least I didn't find any of them.
I need to know where eventually I can find such drivers or how to correctly implement one of them only for read operations (I think I should implement DboSource class, but I don't know what should I override because there isn't anything such virtual or abstract or interface that guide me through this).
I didn't even understand if I should create an Adodb driver or an OleDB driver. I also think that Sqlserver driver is a lot similar to what I should build (except for connectionand some details); if I can use it in some way to shorten my job, it will be helpful.
Edit 1:
Because no one is answering, I can say I'm ok to use MS Access also with "normal" queries (without requiring each table to be bound to a model) but I must be sure that are sanitized and will output arrays similar to what cakes output actually: $jobs['jobs']['name']
Any suggestion on how to achieve this?
Maybe the Adodb or Odbc datasources from https://github.com/cakephp/datasources/tree/2.0/Model/Datasource/Database work with MS Access?
This example is to big to write here it-s from cake bakery Please test it and i'm here for other problems
As I know, Sharepoint save all users list in one table. I have several sharepoint lists. And I want to store Data from Sharepoint lists in custom MS Sql Server DB. That difrent Sharepoint lists store data in diffrent tables. I want that this data is stored only in my custom DB (not in sharepoint DB).
And I also want that mutual (many-to-many) links between difrent lists in this DB are. For example I have 2 lists Projects and Emploeyrs one project can have many employers and one employer can work on several projects. I want that if I delete emploer from project link for that project is deleted from this emploer.
Could You recomend me some sollutions for this task?
I think I know what your trying to do :\
You might want to look at this http://www.simego.com/Products/Data-Synchronisation-Studio and use dynamic columns
Sounds like a real mashup, I'd bee using some external components like the ASPxGridView from DevExpress, http://www.devexpress.com/Products/NET/Controls/ASP/Grid/, to get the list views since you wont be able to use the internal lists.
To interface towards the internal SharePoint lists I'd use the Camelot .NET Connector from Bendsoft, http://www.bendsoft.com/net-sharepoint-connector/.
With that combination it wont really matter where you put the result, it can be used internally in SharePoint as well as externally and it dont matter if you use 2007 or newer either.
I am trying to produce SSRS reports to integrate with a MOSS Dashboard. Reporting Services 2005 only seems to be able to render .xls out of the box. Does SSRS 2008 have the ability to render in xlsx format?
To the best of my experience, exporting to excel2007 is not built into SSRS2008, you need to get an external component for that. Currently looking into what is available on the market, i'll get back to you with what i find.
Edit:
Ok had a look at both aspose.cells and OfficeWriter by SoftArtisans. Both claim to offer .xlsx-exporting capabilities for SSRS, but in both cases this is a partial truth at best.
Both work by having you recreate your report in Excel using their respective add-ons, and then pasting their own markup into your RDL-file. This also has the effect that if you are making an excel-exportable report in either tool, you won't be able to view or export it in anything else from SSRS. Both have the ability to open an existing report and access their datasets from there, which is a major advantage over trying to get MSQuery to work for you.
Aspose suffers from various issues with permissions on the server, where you need to grant it full trust (not everyone would want that). I also had a major hassle getting it installed properly.
OfficeWriter has some issues with shared datasources, where you generally have to go in and set them manually after you've published your report. It also seems to choke on VS2008 RDLs, if you want to use a dataset from a VS2008 report, you have to make a new report in VS2005 with your dataset, and use that as a basis for your excel-built report.
Personally I don't care much for either. But overall Officewriter does seem like it comes out ahead. Next stop is figuring out if it has built-in support for matrices, or that is something we would have to program in VB to get.
According to Exporting to Microsoft Excel(msdn)
The Excel rendering extension renders a report that is compatible with Microsoft Excel 97 and later.
This seems to suggest the old format.